def setUp(self):
     self.initTestMixin()
     self.app = phpApp(FakePersist())
 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_)
 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_)
 def setUp(self):
     self.initTestMixin()
     self.app = phpApp(FakePersist())
 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_)
 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_)