Пример #1
0
 def setUp(self):
     self.initTestMixin()
     self.app = phpApp(FakePersist())
Пример #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_)
Пример #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_)
Пример #4
0
 def setUp(self):
     self.initTestMixin()
     self.app = phpApp(FakePersist())
Пример #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_)
Пример #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_)