Exemplo n.º 1
0
 def test_get_largest_uid_given_more_than_one_question_with_letters(self):
     Question.objects.create(text='question 3',
                             UID='C0005b',
                             answer_type='Number')
     Question.objects.create(text='question 3',
                             UID='C00006',
                             answer_type='Number')
     self.assertEqual(int('00006'), largest_uid(Question))
Exemplo n.º 2
0
 def test_get_largest_uid_returns_00001_if_no_quests_exists(self):
     Question.objects.all().delete()
     self.assertEqual(int('00001'), largest_uid(Question))
Exemplo n.º 3
0
 def test_get_largest_uid(self):
     self.assertEqual(int('00003'), largest_uid(Question))
Exemplo n.º 4
0
 def next_uid(cls):
     return stringify(largest_uid(cls) + 1)