Skip to content

Commit

Permalink
improve missing revision in test
Browse files Browse the repository at this point in the history
Setting revision to None isn't the same as not defining the value.
It makes the test more reliable

Signed-off-by: David Rozé <[email protected]>
  • Loading branch information
david-baylibre committed Feb 16, 2024
1 parent b5be8e0 commit b871d63
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions repo_resource/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit b871d63

Please sign in to comment.