Example #1
0
 def test_statefile(self):
     t = MasherThread(u"F17", u"testing", [u"bodhi-2.0-1.fc17"], log, self.db_factory, self.tempdir)
     t.id = "f17-updates-testing"
     t.init_state()
     t.save_state()
     self.assertTrue(os.path.exists(t.mash_lock))
     with file(t.mash_lock) as f:
         state = json.load(f)
     try:
         self.assertEquals(state, {u"updates": [u"bodhi-2.0-1.fc17"], u"completed_repos": []})
     finally:
         t.remove_state()
Example #2
0
 def test_statefile(self):
     t = MasherThread(u'F17', u'testing', [u'bodhi-2.0-1.fc17'], log, self.db_factory, self.tempdir)
     t.id = 'f17-updates-testing'
     t.init_state()
     t.save_state()
     self.assertTrue(os.path.exists(t.mash_lock))
     with file(t.mash_lock) as f:
         state = json.load(f)
     try:
         self.assertEquals(state, {u'tagged': False, u'updates':
             [u'bodhi-2.0-1.fc17'], u'completed_repos': []})
     finally:
         t.remove_state()
Example #3
0
 def test_statefile(self):
     t = MasherThread(u'F17', u'testing', [u'bodhi-2.0-1.fc17'], log, self.db_factory, self.tempdir)
     t.id = 'f17-updates-testing'
     t.init_state()
     t.save_state()
     self.assertTrue(os.path.exists(t.mash_lock))
     with file(t.mash_lock) as f:
         state = json.load(f)
     try:
         self.assertEquals(state, {u'updates':
             [u'bodhi-2.0-1.fc17'], u'completed_repos': []})
     finally:
         t.remove_state()