Commit 198de66a authored by Taddeus Kroes's avatar Taddeus Kroes

Moved test database settings to config file.

parent c9ee0e75
...@@ -5,3 +5,4 @@ ...@@ -5,3 +5,4 @@
data/ data/
coverage/* coverage/*
.coverage .coverage
tests/config.py
from unittest import TestCase from unittest import TestCase
import MySQLdb as mysql import MySQLdb as mysql
from config import TEST_DB
from generate import Model, php_value, php_assoc, flatten, read_tables, \ from generate import Model, php_value, php_assoc, flatten, read_tables, \
read_fields read_fields
class GenerateTest(TestCase): class GenerateTest(TestCase):
conn = mysql.connect('localhost', 'root', 'mysql12#$', 'test') # TEST_DB = 'localhost', 'root', 'mysql12#$', 'modelgen_test'
conn = mysql.connect(*TEST_DB)
def setUp(self): def setUp(self):
self.model = Model('payments', {}) self.model = Model('payments', {})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment