kopia lustrzana https://github.com/ctjacobs/pyqso
Updated unit tests.
rodzic
e34253adb2
commit
2e074df388
|
@ -19,7 +19,7 @@
|
|||
|
||||
from gi.repository import Gtk
|
||||
import logging
|
||||
import sqlite
|
||||
import sqlite3 as sqlite
|
||||
|
||||
|
||||
class Awards:
|
||||
|
|
|
@ -130,8 +130,7 @@ class TestADIF(unittest.TestCase):
|
|||
""" Check that records can be written to an ADIF file correctly. """
|
||||
records = [{"CALL": "TEST123", "QSO_DATE": "20120402", "TIME_ON": "1234", "FREQ": "145.500", "BAND": "2m", "MODE": "FM", "RST_SENT": "59", "RST_RCVD": "59"},
|
||||
{"CALL": "TEST123", "QSO_DATE": "20130312", "TIME_ON": "0101", "FREQ": "145.750", "BAND": "2m", "MODE": "FM"}]
|
||||
success = self.adif.write(records, "ADIF.test_write.adi")
|
||||
assert(success)
|
||||
self.adif.write(records, "ADIF.test_write.adi")
|
||||
|
||||
f = open("ADIF.test_write.adi", 'r')
|
||||
text = f.read()
|
||||
|
@ -173,8 +172,7 @@ class TestADIF(unittest.TestCase):
|
|||
records = c.fetchall()
|
||||
print(records)
|
||||
|
||||
success = self.adif.write(records, "ADIF.test_write_sqlite3_Row.adi")
|
||||
assert(success)
|
||||
self.adif.write(records, "ADIF.test_write_sqlite3_Row.adi")
|
||||
|
||||
f = open("ADIF.test_write_sqlite3_Row.adi", 'r')
|
||||
text = f.read()
|
||||
|
|
|
@ -47,8 +47,7 @@ END-OF-LOG:"""
|
|||
mycall = "MYCALL"
|
||||
mycontest = "MYCONTEST"
|
||||
path = "Cabrillo.test_write.log"
|
||||
success = self.cabrillo.write(records, path, contest=mycontest, mycall=mycall)
|
||||
assert(success)
|
||||
self.cabrillo.write(records, path, contest=mycontest, mycall=mycall)
|
||||
|
||||
actual = ""
|
||||
f = open(path, "r")
|
||||
|
|
Ładowanie…
Reference in New Issue