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"
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)