Skip to content

Instantly share code, notes, and snippets.

@bryanyang0528
Last active May 15, 2020 16:05
Show Gist options
  • Save bryanyang0528/1190b66edd21e3672351b4c426a61851 to your computer and use it in GitHub Desktop.
Save bryanyang0528/1190b66edd21e3672351b4c426a61851 to your computer and use it in GitHub Desktop.
sqllite
import unittest
import db_model
TEMP_DB_FILE = ':memory:'
class TestCoreBasic(unittest.TestCase):
def setUp(self):
self.db_url = 'sqlite:///{}'.format(TEMP_DB_FILE)
self.engine, self.session = db_model.db_init(self.db_url)
self.db_conn = self.engine.connect()
def tearDown(self):
db_model.db_drop(self.db_engine)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment