Exemplo n.º 1
0
 def setUp(self):
     self.initTestMixin()
     self.app = phpApp(FakePersist())
Exemplo n.º 2
0
 def test_should_return_empty_record_when_file_is_corrupted(self):
     persist = Persist()
     persist.FILE_NAME = 'corupted_file'
     phpApp(persist).main(['retrieve', 'PERSIST_RECORD'])
     self.assertIn('Record Not Found.', self.saved_contents_)
Exemplo n.º 3
0
 def test_should_be_able_to_retrieve_persistent_record(self):
     phpApp(Persist()).main(['create', 'PERSIST_RECORD'])
     self.clearSavedOutput()
     phpApp(Persist()).main(['retrieve', 'PERSIST_RECORD'])
     self.assertIn('PERSIST_RECORD', self.saved_contents_)
Exemplo n.º 4
0
 def setUp(self):
     self.initTestMixin()
     self.app = phpApp(FakePersist())
Exemplo n.º 5
0
 def test_should_return_empty_record_when_file_is_corrupted(self):
     persist = Persist()
     persist.FILE_NAME = 'corupted_file'
     phpApp(persist).main(['retrieve', 'PERSIST_RECORD'])
     self.assertIn('Record Not Found.', self.saved_contents_)
Exemplo n.º 6
0
 def test_should_be_able_to_retrieve_persistent_record(self):
     phpApp(Persist()).main(['create', 'PERSIST_RECORD'])
     self.clearSavedOutput()
     phpApp(Persist()).main(['retrieve', 'PERSIST_RECORD'])
     self.assertIn('PERSIST_RECORD', self.saved_contents_)