Did I find the right examples for you? yes no

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

src/v/o/votainteligente-portal-electoral-HEAD/elections/sitemaps.py   votainteligente-portal-electoral(Download)
	def items(self):
		return Candidate.objects.all()
 
	def location(self, obj):
		url = reverse('candidate_detail_view', kwargs={

src/v/o/votainteligente-portal-electoral-HEAD/elections/tests/ranking_tests.py   votainteligente-portal-electoral(Download)
    def test_mixin(self):
 
        ranking_view = RankingMixin()
        ranking_view.candidate_queryset = Candidate.objects.all()
 
    def test_get_all_messages(self):
        ranking_view = RankingMixin()
        ranking_view.candidate_queryset = Candidate.objects.all()
 
        self.assertEquals(ranking_view.all_messages().count(), 4)
    def test_get_all_possible_answers(self):
 
        ranking_view = RankingMixin()
        ranking_view.candidate_queryset = Candidate.objects.all()
 
        self.assertEquals(ranking_view.all_possible_answers(), 15)
 
    def test_get_actual_answered_questions(self):
        ranking_view = RankingMixin()
        ranking_view.candidate_queryset = Candidate.objects.all()
    def test_get_index(self):
        ranking_view = RankingMixin()
        ranking_view.candidate_queryset = Candidate.objects.all()
 
        expected_index = float(15)/float(6)

src/c/a/candideitorg-django-0.0.1/candideitorg/tests.py   candideitorg-django(Download)
        Election.fetch_all_from_api()
 
        juanito = Candidate.objects.all()[0]
 
 
        election.update()
 
        juanito = Candidate.objects.all()[0]
        self.assertEquals(juanito.answers.all().count(), 4)
 
        self.assertTrue(result.successful())
 
        juanito = Candidate.objects.all()[0]
        self.assertEquals(juanito.answers.all().count(), 4)
 
    def test_election_update_answers(self):
        Election.fetch_all_from_api()
        juanito = Candidate.objects.all()[0]
 
        UpdatingDataCandidator.install_candidator_yaml(yaml_file='candidator_example_data_with_answers2')
        election = Election.objects.all()[0]
        election.update_answers()
 
 
        juanito = Candidate.objects.all()[0]