Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
  • Loading branch information
TG1999 committed Mar 7, 2024
1 parent 1daab5a commit 748cc8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/contrib/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
# Visit https://github.com/package-url/packageurl-python for support and
# download.

import pytest

from packageurl.contrib.django.utils import purl_to_lookups
from packageurl.utils import get_golang_purl

Expand Down Expand Up @@ -70,3 +72,5 @@ def test_get_golang_purl():
go_package="github.com/grpc-ecosystem/go-grpc-middleware v1.3.0"
)
assert "pkg:golang/github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0" == str(golang_purl_2)
with pytest.raises(Exception):
get_golang_purl("github.com/envoyproxy/go-control-plane/envoy/config/listener@v3.1")

0 comments on commit 748cc8a

Please sign in to comment.