Skip to content

Commit 3c9f234

Browse files
committed
Address concerns from gemini bot
Signed-off-by: yowgf <[email protected]>
1 parent 54cf48f commit 3c9f234

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_model.py

+14
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,20 @@ def test_init_from_json(self) -> None:
509509
assert entity.name == name
510510
assert entity.urls == SortedSet([XsUri(url) for url in urls])
511511
assert entity.bom_ref == BomRef(bom_ref)
512+
assert len(entity.urls) == 1
513+
assert next(iter(entity.urls)) == XsUri(urls[0])
514+
515+
def test_init_from_json_without_url(self) -> None:
516+
bom_ref = 'Example'
517+
name = 'Example'
518+
specification = {
519+
'name': name,
520+
'bom-ref': bom_ref
521+
}
522+
entity = OrganizationalEntity.from_json(specification)
523+
assert entity.name == name
524+
assert entity.urls == SortedSet()
525+
assert entity.bom_ref == BomRef(bom_ref)
512526

513527

514528
class TestModelXsUri(TestCase):

0 commit comments

Comments
 (0)