aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2012-01-21 16:14:32 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2012-01-29 16:33:46 -0600
commit09e2c48701f8a3fb00da68a61935e75c46a3ec3b (patch)
tree768dd5f0523ce29d0c66f8c34a261c99b05af906
parentdc3db4681f0e3c99914dac99945a399a045f895f (diff)
downloadmediagoblin-09e2c48701f8a3fb00da68a61935e75c46a3ec3b.tar.lz
mediagoblin-09e2c48701f8a3fb00da68a61935e75c46a3ec3b.tar.xz
mediagoblin-09e2c48701f8a3fb00da68a61935e75c46a3ec3b.zip
Wrote up some scaffolding for the actual tests
-rw-r--r--mediagoblin/tests/test_sql_migrations.py56
1 files changed, 53 insertions, 3 deletions
diff --git a/mediagoblin/tests/test_sql_migrations.py b/mediagoblin/tests/test_sql_migrations.py
index 96324d77..d94888e9 100644
--- a/mediagoblin/tests/test_sql_migrations.py
+++ b/mediagoblin/tests/test_sql_migrations.py
@@ -397,7 +397,7 @@ def _insert_migration2_objects(session):
session.add_all(
[LevelExit2(name='portal',
from_level='central_park',
- to_level='necroplex')]
+ to_level='necroplex')])
session.commit()
@@ -451,7 +451,7 @@ def _insert_migration3_objects(session):
CreaturePower3(
name='smite',
description='Smitten by holy wrath!',
- hitpower=9999.9))
+ hitpower=9999.9))))
# Insert levels
session.add_all(
@@ -482,8 +482,58 @@ def _insert_migration3_objects(session):
session.add_all(
[LevelExit3(name='portal',
from_level='central_park',
- to_level='necroplex')]
+ to_level='necroplex')])
session.commit()
+def create_test_engine():
+ from sqlalchemy import create_engine
+ engine = create_engine('sqlite:///:memory:', echo=False)
+ return engine
+
+
+def test_set1_to_set3():
+ # Create / connect to database
+ # Create tables by migrating on empty initial set
+
+ # Install the initial set
+ # Check version in database
+ # Sanity check a few things in the database
+
+ # Migrate
+ # Make sure version matches expected
+ # Check all things in database match expected
+ pass
+
+
+def test_set2_to_set3():
+ # Create / connect to database
+ # Create tables by migrating on empty initial set
+
+ # Install the initial set
+ # Check version in database
+ # Sanity check a few things in the database
+
+ # Migrate
+ # Make sure version matches expected
+ # Check all things in database match expected
+ pass
+
+
+def test_set1_to_set2_to_set3():
+ # Create / connect to database
+ # Create tables by migrating on empty initial set
+
+ # Install the initial set
+ # Check version in database
+ # Sanity check a few things in the database
+
+ # Migrate
+ # Make sure version matches expected
+ # Check all things in database match expected
+
+ # Migrate again
+ # Make sure version matches expected again
+ # Check all things in database match expected again
+ pass