Beispiel #1
0
 def test_implementation(self):
     """
     Make sure the following tests are faking the right stuff.
     """
     ppd = PPD()
     self.fakeLastUpdated(ppd, 65.0)
     self.assertEqual(ppd.last_updated(), 65.0)
Beispiel #2
0
 def test_addFile(self):
     """
     Adding a file should update last_updated.
     """
     ppd = PPD()
     self.fakeLastUpdated(ppd, 12.2)
     ppd.addFile(StringIO('foo'), 'jim.txt', {})
     self.assertNotEqual(ppd.last_updated(), 12.2)
Beispiel #3
0
 def test_addObject(self):
     """
     Adding an object should change last_updated
     """
     ppd = PPD()
     self.fakeLastUpdated(ppd, 12.2)
     ppd.addObject({'foo': 'bar'})
     self.assertNotEqual(ppd.last_updated(), 12.2)
Beispiel #4
0
 def test_deleteObject(self):
     """
     Deleting an object is an update
     """
     ppd = PPD()
     ppd.addObject({'foo': 'bar'})
     self.fakeLastUpdated(ppd, 12.2)
     ppd.deleteObject(0)
     self.assertNotEqual(ppd.last_updated(), 12.2)