Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
modelgen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
modelgen
Commits
198de66a
Commit
198de66a
authored
12 years ago
by
Taddeus Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Moved test database settings to config file.
parent
c9ee0e75
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
tests/test_generate.py
+4
-1
4 additions, 1 deletion
tests/test_generate.py
with
5 additions
and
1 deletion
.gitignore
+
1
−
0
View file @
198de66a
...
...
@@ -5,3 +5,4 @@
data/
coverage/*
.coverage
tests/config.py
This diff is collapsed.
Click to expand it.
tests/test_generate.py
+
4
−
1
View file @
198de66a
from
unittest
import
TestCase
import
MySQLdb
as
mysql
from
config
import
TEST_DB
from
generate
import
Model
,
php_value
,
php_assoc
,
flatten
,
read_tables
,
\
read_fields
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
):
self
.
model
=
Model
(
'
payments
'
,
{})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment