示例#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')