コード例 #1
0
 def setUp(self):
     self.connection = connect_test()
     drop_db(self.connection)
     create_db(self.connection)
     user = User(name=self.name1, min_=0, max_=100, current=50)
     add_user(self.connection, user)
     user = User(name=self.name2, min_=0, max_=20, current=10)
     add_user(self.connection, user)
     self.connection.commit()
     self.connection2 = connect_test()
コード例 #2
0
 def setUp(self):
     self.connection = connect_test()
     drop_db(self.connection)
     create_db(self.connection)
     self.connection.commit()
コード例 #3
0
ファイル: init.py プロジェクト: Tishka17/sber_test
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from connect import connect_production

from model.use_cases import create_db

with connect_production() as conn:
    create_db(conn)