def test_get_none(self): with self.assertRaises(User.DoesNotExist): User.get()
def test_get_multiple(self): with self.assertRaises(MultipleObjectsReturned): User.get()
def test_get_by_id(self): user = User.get(id=1) self.assertEqual(user.email, 'malcolm@äcdc.com')