tests: Patch time in CTS related tests
The value must be fixed to match the expected JSON. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
b8c3ca1abe
commit
d6caf0785b
@ -593,6 +593,7 @@ class ComposeTestCase(unittest.TestCase):
|
|||||||
d = compose.mkdtemp(prefix="tweak_buildinstall")
|
d = compose.mkdtemp(prefix="tweak_buildinstall")
|
||||||
self.assertTrue(os.path.isdir(d))
|
self.assertTrue(os.path.isdir(d))
|
||||||
|
|
||||||
|
@mock.patch("time.strftime", new=lambda fmt, time: "20200526")
|
||||||
def test_get_compose_info(self):
|
def test_get_compose_info(self):
|
||||||
conf = ConfigWrapper(
|
conf = ConfigWrapper(
|
||||||
release_name="Test",
|
release_name="Test",
|
||||||
@ -606,6 +607,7 @@ class ComposeTestCase(unittest.TestCase):
|
|||||||
ci_json = json.loads(ci.dumps())
|
ci_json = json.loads(ci.dumps())
|
||||||
self.assertEqual(ci_json, self.ci_json)
|
self.assertEqual(ci_json, self.ci_json)
|
||||||
|
|
||||||
|
@mock.patch("time.strftime", new=lambda fmt, time: "20200526")
|
||||||
def test_get_compose_info_cts(self):
|
def test_get_compose_info_cts(self):
|
||||||
conf = ConfigWrapper(
|
conf = ConfigWrapper(
|
||||||
release_name="Test",
|
release_name="Test",
|
||||||
|
Loading…
Reference in New Issue
Block a user