def test_filename(self, mock_read_json): """ Test that the filename is correct. """ mock_read_json.return_value = None history = CompactHistory('history.json') self.assertEqual('history.json', history.filename())
def test_filename(self, mock_read_json): """ Test getting the filename. """ mock_read_json.retrun_value = '{"unimportant": "not used"}' history = CompactHistory('history_file_name.json') self.assertEqual('history_file_name.json', history.filename())