Пример #1
0
class TestCase(unittest.TestCase):

    def setUp(self):
        self.app = app.test_client()
        self.u = User(username='******', email='*****@*****.**')
        self.u.save()

    def tearDown(self):
        self.u.delete()

    def test_created_user(self):
        self.assertEqual(self.u.username, 'john')
Пример #2
0
 def setUp(self):
     self.app = app.test_client()
     self.u = User(username='******', email='*****@*****.**')
     self.u.save()