Beispiel #1
0
 def test_getting_max_pk(self):
     for x in range(0, 10):
         y = User(username=x)
         y.set_password(force_text(x))
         y.full_clean()
         y.save()
     self.assertEqual(10, get_maximum_pk(User))
Beispiel #2
0
 def test_getting_max_pk_for_no_objects(self):
     self.assertEqual(1, get_maximum_pk(Group))