def test_error_if_version_not_10(self): reader = get_mock_reader([ b"<VERSIE>2.0</VERSIE>\n" ]) parser.parse_version(reader) self.assertFalse(reader.success)
def test_success_with_correct_line(self): reader = get_mock_reader([ b"<VERSIE>1.0</VERSIE>\n" ]) parser.parse_version(reader) self.assertTrue(reader.success)
def test_if_version_line_missing_doesnt_move_line_number(self): reader = get_mock_reader([ b"<REEKS>testing,testing,</REEKS>\n" ]) parser.parse_version(reader) self.assertFalse(reader.success) self.assertEquals(reader.line_number, 1)