mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-12 21:22:17 +00:00
Fixed tests init
This commit is contained in:
parent
c515a25b69
commit
2ea7224815
@ -31,7 +31,16 @@ class TestConfig(DefaultConfig):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, with_webui, with_api):
|
def __init__(self, with_webui, with_api):
|
||||||
super(TestConfig, self).__init__
|
super(TestConfig, self).__init__()
|
||||||
|
|
||||||
|
for attr, value in self.__class__.__dict__.iteritems():
|
||||||
|
if attr.startswith('_') or attr != attr.upper():
|
||||||
|
continue
|
||||||
|
|
||||||
|
if isinstance(value, dict):
|
||||||
|
setattr(self, attr, value.copy())
|
||||||
|
else:
|
||||||
|
setattr(self, attr, value)
|
||||||
|
|
||||||
self.WEBAPP.update({
|
self.WEBAPP.update({
|
||||||
'mount_webui': with_webui,
|
'mount_webui': with_webui,
|
||||||
@ -56,6 +65,7 @@ class TestBase(unittest.TestCase):
|
|||||||
schema = sql.read()
|
schema = sql.read()
|
||||||
for statement in schema.split(';'):
|
for statement in schema.split(';'):
|
||||||
self.store.execute(statement)
|
self.store.execute(statement)
|
||||||
|
self.store.commit()
|
||||||
|
|
||||||
self.client = app.test_client()
|
self.client = app.test_client()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user