Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/test_db_story.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_db_story.py')
-rw-r--r--tests/test_db_story.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_db_story.py b/tests/test_db_story.py
index 08a8e71..941372d 100644
--- a/tests/test_db_story.py
+++ b/tests/test_db_story.py
@@ -24,14 +24,14 @@ class TestDBStory(unittest.TestCase):
def test_add(self):
# second row
- key = story.Key(None, 'helo', 'image', 0, 1, 'helo.png')
+ key = story.Key(None, 'helo', 'image', 'helo.png')
story.DB().add(key)
all = [r for r in story.DB().all()]
self.assertEqual(len(all), 1,
"should have 1 row! found: %s" % len(all))
self.assertEqual(all[0], key, "not the same row: %s" % all[0])
# second row
- key = story.Key(None, 'hola', 'image', 0, 2, 'hola.png')
+ key = story.Key(None, 'hola', 'image', 'hola.png')
story.DB().add(key)
all = [r for r in story.DB().all()]
self.assertEqual(len(all), 2,
@@ -39,7 +39,7 @@ class TestDBStory(unittest.TestCase):
self.assertEqual(all[1], key, "not the same row: %s" % all[1])
def test_get(self):
- key = story.Key(None, 'helo', 'image', 0, 1, 'helo.png')
+ key = story.Key(None, 'helo', 'image', 'helo.png')
story.DB().add(key)
all = [r for r in story.DB().get(story.Key(name='helo'))]
self.assertEqual(len(all), 1,
@@ -47,15 +47,15 @@ class TestDBStory(unittest.TestCase):
self.assertEqual(all[0], key, "not the same row: %s" % all[0])
def test_update(self):
- key = story.Key(None, 'helo', 'image', 0, 1, 'helo.png')
+ key = story.Key(None, 'helo', 'image', 'helo.png', layer=1)
story.DB().add(key)
all = [r for r in story.DB().all()]
- key = story.Key(id=all[0].id, name='hola', layer=2, media='hola.png')
+ key = story.Key(id=all[0].id, name='hola', media='hola.png', layer=2)
story.DB().update(key)
all = [r for r in story.DB().all()]
self.assertEqual(len(all), 1,
"should have 1 row! found: %s" % len(all))
- exp_key = story.Key(None, 'hola', 'image', 0, 2, 'hola.png')
+ exp_key = story.Key(None, 'hola', 'image', 'hola.png', layer=2)
self.assertEqual(all[0], exp_key, "not the same row: %s" % all[0])
def suite():