Пример #1
0
from ocr.setup import is_installed, new_ong_dir, create_database, create_tables

if not is_installed():
    print "Installing..."
    new_ong_dir()
    create_database()
    create_tables()
else:
    print "Installed"
Пример #2
0
 def test_create_tables(self, mock_base, mock_engine):
     create_tables()
     mock_engine.execute.assert_called_with("USE `%s`" % BD_NAME)
     mock_base.metadata.create_all.assert_called_with(mock_engine)
Пример #3
0
 def test_create_tables(self, mock_base, mock_engine):
     create_tables()
     mock_engine.execute.assert_called_with("USE `%s`" % BD_NAME)
     mock_base.metadata.create_all.assert_called_with(mock_engine)