def test_assert_against_file_fails_with_reporter(self): reporter = TestingReporter() file_path = get_adjacent_file("manual_file.approved.txt") try: assert_against_file("This text is NOT in a file", file_path, reporter ) except ApprovalException: pass self.assertTrue(reporter.called)
def test_assert_against_file_works(self): file_path = get_adjacent_file("manual_file.approved.txt") assert_against_file("This text is in a file", file_path)