fix tests

This commit is contained in:
Tomas Kopecek 2020-08-25 13:01:03 +02:00
parent bf5684a122
commit c754713818
3 changed files with 5 additions and 4 deletions

View file

@ -11,8 +11,8 @@ Tag: f23
Status: complete
Built by: user
ID: 612609
Started: Wed, 18 Feb 2015 14:50:37 EST
Finished: Wed, 18 Feb 2015 14:57:37 EST
Started: Wed, 18 Feb 2015 09:50:37 EST
Finished: Wed, 18 Feb 2015 09:57:37 EST
Changelog:
* Wed Feb 18 2015 Happy Koji User <user@example.com> - 1:0.3.0-0.2.M1
- Unbundle ASM

View file

@ -59,6 +59,7 @@ class MyClientSession(koji.ClientSession):
class TestBuildNotification(unittest.TestCase):
def setUp(self):
self.maxDiff = None
self.original_timezone = os.environ.get('TZ')
os.environ['TZ'] = 'US/Eastern'
time.tzset()
@ -111,5 +112,5 @@ class TestBuildNotification(unittest.TestCase):
msg_expect = fp.read()
if six.PY2:
msg_expect = msg_expect.decode()
self.assertEqual(message, msg_expect)
self.assertMultiLineEqual(message.decode(), msg_expect.decode())
locale.resetlocale()

View file

@ -218,7 +218,7 @@ class TestParseTaskParams(utils.CliTestCase):
self.__run_parseTask_test('prepRepo', params, expect)
def test_createRepo(self):
params = [1, 'x86_64', {'id': 1, 'creation_time': '1970-1-1 0:0:0'},
params = [1, 'x86_64', {'id': 1, 'creation_ts': 0},
[{'external_repo_name': 'fedoraproject.net'},
{'external_repo_name': 'centos.org'}]]
expect = ["Repo ID: %i" % params[0]]