Exemple #1
0
def create_all():
    """Creates database tables"""

    input_var = input('Are you sure you wish to create all tables? y/n: ')
    if input_var == 'y' or input_var == 'Y':
        db.create_all()
        populate_db()
        print('Database tables created')
Exemple #2
0
def db(app):
    _db.drop_all()
    _db.create_all()
    populate_db()

    yield _db

    _db.session.remove()
    _db.drop_all()
Exemple #3
0
    def setUp(self):
        db.create_all()
        populate_db()

        self.json_parser = JsonParser()
        # self.data = self.json_parser.parse_raw_data(jsondata)

        self.feed = FeedFactory()
        db.session.add(self.feed)
        db.session.commit()
Exemple #4
0
def db(app):
    print("Creating database")
    _db.drop_all()
    _db.create_all()
    populate_db()

    yield _db

    print("Dropping database")
    _db.session.remove()
    _db.drop_all()
Exemple #5
0
 def setUp(self):
     db.create_all()
     populate_db()
Exemple #6
0
    def setUp(self):
        db.create_all()
        populate_db()

        self.feed = FeedFactory().save()
Exemple #7
0
    def setUp(self):
        db.create_all()
        populate_db()

        self.parser = JsonParser()
        self.data = self.parser.parse_raw_data(jsondata)