Ejemplo n.º 1
0
 def test_loading_book_mark_good(self):
     model = Model()
     
     self.assertEqual(model.getStatus(), State.NO_OPEN_FILE)        
     model.loadBookmark(os.getcwd() + "\\bookmarks.html")
     self.assertEqual(model.getStatus(), State.FILE_OPENED)
     self.assertEqual(model.numberOfVideos(), 3)
Ejemplo n.º 2
0
 def test_loading_book_mark_bad(self):
     model = Model()
     
     #test to make sure that if the file does not exist, the state
     #is still NO_OPEN_FILE. We don't check if its EMPTY_FILE since
     #that is just a flag state for the UI to display a error dialog box
     #and instantly changes back to NO_OPEN_FILE after the UI has been informed.
     self.assertEqual(model.getStatus(), State.NO_OPEN_FILE)
     model.loadBookmark("")
     self.assertEqual(model.getStatus(), State.NO_OPEN_FILE)
     self.assertEqual(model.numberOfVideos(), 0)