One more test resource file migration.

pull/61/head
Christian T. Jacobs 2017-07-13 17:23:27 +01:00
rodzic 8dc9ed6aac
commit 1b98e7695e
2 zmienionych plików z 3 dodań i 5 usunięć

Wyświetl plik

@ -0,0 +1 @@
<call:4>TEST<band:3>40m<mode:2>CW<qso_date:8:d>20130322<time_on:4>1955<eor>

Wyświetl plik

@ -87,11 +87,8 @@ class TestADIF(unittest.TestCase):
def test_read_no_header(self):
""" Check that an ADIF file can be parsed with no header information. """
f = open("ADIF.test_read_no_header.adi", 'w')
f.write("""<call:4>TEST<band:3>40m<mode:2>CW<qso_date:8:d>20130322<time_on:4>1955<eor>""")
f.close()
records = self.adif.read("ADIF.test_read_no_header.adi")
path = os.path.join(os.path.realpath(os.path.dirname(__file__)), "res", "ADIF.test_read_no_header.adi")
records = self.adif.read(path)
expected_records = [{'TIME_ON': '1955', 'BAND': '40m', 'CALL': 'TEST', 'MODE': 'CW', 'QSO_DATE': '20130322'}]
print("Imported records: ", records)
print("Expected records: ", expected_records)