예제 #1
0
 def setUp(self):
     with test_app.app_context():
         db.create_all()
         group = Group(name=f'testGroup', )
         img1 = Image(
             data=b'abcdefggggggg',
             img_type='jpeg',
             tags=['aTag'],
         )
         img2 = Image(
             data=b'abcdefggggggg',
             img_type='jpeg',
             tags=['bTag'],
         )
         group.images = [img1, img2]
         db.session.add(group)
         img3 = Image(
             data=b'abcdefggggggg',
             img_type='jpeg',
             tags=['cTag'],
         )
         db.session.add(img3)
         db.session.commit()
예제 #2
0
 def setUp(self):
     with test_app.app_context():
         db.create_all()
         fake_records(1)
예제 #3
0
 def setUp(self):
     with test_app.app_context():
         db.create_all()
예제 #4
0
 def setUp(self):
     with test_app.app_context():
         db.create_all()
         fake_images(20)