Ejemplo n.º 1
0
 def test_get_current_note(self):
     window = MainWindow()
     self.assert_(window.current_page is None)
     note = Note('dummy', path('./tests/dummy/dummy.txt'))
     note.open()
     self.assertEqual(note, window.current_page.note)
     window.Destroy()
Ejemplo n.º 2
0
 def test_on_note_closed(self):
     window = MainWindow()
     self.assertEqual(len(window.pages), 0)
     note = Note('dummy', path('./tests/dummy/dummy.txt'))
     note.open()
     self.assertEqual(len(window.pages), 1)
     note.close()
     self.assertEqual(len(window.pages), 0)
     self.assert_(window.current_page is None)
     window.Destroy()