Exemple #1
0
 async def test_minimal__uninstantiated_iterate(self):
     tour = testmodels.Tournament(name="Team1")
     with self.assertRaisesRegex(
             OperationalError,
             "This objects hasn't been instanced, call .save()"):
         async for _ in tour.minrelations:
             pass
Exemple #2
0
 async def test_minimal__uninstantiated_create(self):
     tour = testmodels.Tournament(name="Team1")
     with self.assertRaisesRegex(OperationalError,
                                 "You should first call .save()"):
         await testmodels.MinRelation.create(tournament=tour)
Exemple #3
0
 async def test_minimal__uninstantiated_await(self):
     tour = testmodels.Tournament(name='Team1')
     with self.assertRaisesRegex(
             OperationalError,
             "This objects hasn't been instanced, call .save()"):
         await tour.minrelations