Пример #1
0
 def test_get_none(self):
     with self.assertRaises(User.DoesNotExist):
         User.get()
Пример #2
0
 def test_get_multiple(self):
     with self.assertRaises(MultipleObjectsReturned):
         User.get()
Пример #3
0
 def test_get_by_id(self):
     user = User.get(id=1)
     self.assertEqual(user.email, 'malcolm@äcdc.com')