From b871d63002b7df9b93410ceb1a83e543518498f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Roz=C3=A9?= Date: Thu, 15 Feb 2024 18:58:09 +0100 Subject: [PATCH] improve missing revision in test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setting revision to None isn't the same as not defining the value. It makes the test more reliable Signed-off-by: David Rozé --- repo_resource/test_check.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/repo_resource/test_check.py b/repo_resource/test_check.py index 039a966..5025d99 100644 --- a/repo_resource/test_check.py +++ b/repo_resource/test_check.py @@ -31,6 +31,12 @@ def setUp(self): 'name': 'aosp_device_fixed.xml' } } + self.demo_manifests_source_norev = { + 'source': { + 'url': 'https://github.com/makohoek/demo-manifests.git', + 'name': 'aosp_device_fixed.xml' + } + } self.demo_ssh_manifests_source = { 'source': { 'url': 'https://github.com/makohoek/demo-manifests.git', @@ -94,8 +100,7 @@ def test_unknown_manifest_name(self): check.check(instream) def test_branch_defaults_to_HEAD(self): - no_revision_data = self.demo_manifests_source - no_revision_data['source']['revision'] = None + no_revision_data = self.demo_manifests_source_norev instream = StringIO(json.dumps(no_revision_data)) check.check(instream)