Пример #1
0
 def can_import_fixtures(self):
     from tessera.application import db
     from tessera.importer.json import JsonImporter
     from tessera.model.database import Dashboard
     db.create_all()
     path = os.path.abspath(os.path.join(
         os.path.dirname(__file__), '..', 'demo', 'demo-gallery.json'
     ))
     JsonImporter.import_file(path)
     eq_(len(Dashboard.query.all()), 1)
Пример #2
0
 def can_import_fixtures(self):
     from tessera.application import db
     from tessera.importer.json import JsonImporter
     from tessera.database import DashboardRecord
     db.create_all()
     path = os.path.abspath(
         os.path.join(os.path.dirname(__file__), '..', 'demo',
                      'demo-gallery.json'))
     JsonImporter.import_file(path)
     eq_(len(DashboardRecord.query.all()), 1)
Пример #3
0
 def can_initdb(self):
     from tessera.application import db
     from tessera.model.database import Dashboard
     # Make sure we can create and look at the DB
     db.create_all()
     eq_(len(Dashboard.query.all()), 0)
Пример #4
0
 def can_initdb(self):
     from tessera.application import db
     from tessera.database import DashboardRecord
     # Make sure we can create and look at the DB
     db.create_all()
     eq_(len(DashboardRecord.query.all()), 0)