tests: Work with older unittest2

RHEL has an older version of the library which does not backport all the
assertions that we used. In order for the tests to pass there we need to
use names that exist everywhere.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-10-30 09:16:18 +01:00
parent 6f21576921
commit f21e3a2d6d
7 changed files with 37 additions and 33 deletions

View file

@ -159,7 +159,7 @@ class TestCopyFiles(helpers.PungiTestCase):
extra_files.copy_extra_files(
compose, [cfg], 'x86_64', compose.variants['Server'], package_sets)
self.assertRegex(str(ctx.exception), 'No.*package.*matching bad-server\*.*')
self.assertRegexpMatches(str(ctx.exception), 'No.*package.*matching bad-server\*.*')
self.assertEqual(len(get_file_from_scm.call_args_list), 0)
self.assertEqual(get_dir_from_scm.call_args_list, [])