From 2e074df3881239af731e4dd07202711dee7c794d Mon Sep 17 00:00:00 2001 From: "Christian T. Jacobs" Date: Mon, 3 Jul 2017 13:29:08 +0100 Subject: [PATCH] Updated unit tests. --- pyqso/awards.py | 2 +- tests/test_adif.py | 6 ++---- tests/test_cabrillo.py | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pyqso/awards.py b/pyqso/awards.py index c2c72fc..2d6be85 100644 --- a/pyqso/awards.py +++ b/pyqso/awards.py @@ -19,7 +19,7 @@ from gi.repository import Gtk import logging -import sqlite +import sqlite3 as sqlite class Awards: diff --git a/tests/test_adif.py b/tests/test_adif.py index f7501e3..e007ac9 100644 --- a/tests/test_adif.py +++ b/tests/test_adif.py @@ -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() diff --git a/tests/test_cabrillo.py b/tests/test_cabrillo.py index 9a1ba44..c632709 100644 --- a/tests/test_cabrillo.py +++ b/tests/test_cabrillo.py @@ -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")