"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/test_schema.py" between
roundup-1.6.1.tar.gz and roundup-2.0.0.tar.gz

About: Roundup is an highly customisable issue-tracking system with command-line, web and e-mail interfaces (written in Python).

test_schema.py  (roundup-1.6.1):test_schema.py  (roundup-2.0.0)
skipping to change at line 44 skipping to change at line 44
self.db = back_anydbm.Database(config, 'admin') self.db = back_anydbm.Database(config, 'admin')
self.db.post_init() self.db.post_init()
self.db.clear() self.db.clear()
def tearDown(self): def tearDown(self):
self.db.close() self.db.close()
shutil.rmtree(config.DATABASE) shutil.rmtree(config.DATABASE)
def testA_Status(self): def testA_Status(self):
status = back_anydbm.Class(self.db, "status", name=String()) status = back_anydbm.Class(self.db, "status", name=String())
self.assert_(status, 'no class object generated') self.assertTrue(status, 'no class object generated')
status.setkey("name") status.setkey("name")
val = status.create(name="unread") val = status.create(name="unread")
self.assertEqual(val, '1', 'expecting "1"') self.assertEqual(val, '1', 'expecting "1"')
val = status.create(name="in-progress") val = status.create(name="in-progress")
self.assertEqual(val, '2', 'expecting "2"') self.assertEqual(val, '2', 'expecting "2"')
val = status.create(name="testing") val = status.create(name="testing")
self.assertEqual(val, '3', 'expecting "3"') self.assertEqual(val, '3', 'expecting "3"')
val = status.create(name="resolved") val = status.create(name="resolved")
self.assertEqual(val, '4', 'expecting "4"') self.assertEqual(val, '4', 'expecting "4"')
val = status.count() val = status.count()
skipping to change at line 67 skipping to change at line 67
self.assertEqual(val, ['1', '2', '3', '4'], 'blah') self.assertEqual(val, ['1', '2', '3', '4'], 'blah')
val = status.lookup("in-progress") val = status.lookup("in-progress")
self.assertEqual(val, '2', 'expecting "2"') self.assertEqual(val, '2', 'expecting "2"')
status.retire('3') status.retire('3')
val = status.list() val = status.list()
self.assertEqual(val, ['1', '2', '4'], 'blah') self.assertEqual(val, ['1', '2', '4'], 'blah')
def testB_Issue(self): def testB_Issue(self):
issue = back_anydbm.Class(self.db, "issue", title=String(), issue = back_anydbm.Class(self.db, "issue", title=String(),
status=Link("status")) status=Link("status"))
self.assert_(issue, 'no class object returned') self.assertTrue(issue, 'no class object returned')
def testC_User(self): def testC_User(self):
user = back_anydbm.Class(self.db, "user", username=String(), user = back_anydbm.Class(self.db, "user", username=String(),
password=Password()) password=Password())
self.assert_(user, 'no class object returned') self.assertTrue(user, 'no class object returned')
user.setkey("username") user.setkey("username")
# vim: set filetype=python sts=4 sw=4 et si : # vim: set filetype=python sts=4 sw=4 et si :
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)