Did I find the right examples for you? yes no

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/c/a/candideitorg-django-0.0.1/candideitorg/tests.py   candideitorg-django(Download)
    def test_load_all_elections(self):
        Election.fetch_all_from_api()
        self.assertEquals(Election.objects.count(), 21)
 
 
    def test_upgrade_data(self):
        Election.fetch_all_from_api()
        Election.fetch_all_from_api()
        self.assertEquals(Election.objects.count(), 1)
        self.assertEquals(Category.objects.count(), 2)
    def test_fetch_all_election(self):
        Election.fetch_all_from_api()
        self.assertEquals(Election.objects.count(), 1)
 
        election = Election.objects.all()[0]
    def test_call_command(self):
        self.assertEquals(Election.objects.count(), 0)
        call_command('update_from_candidator')
        self.assertEquals(Election.objects.count(), 1)