File tree 2 files changed +21
-19
lines changed 2 files changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -669,14 +669,14 @@ def test_trusted_published_all(self, db_session):
669
669
assert release .trusted_published
670
670
671
671
@pytest .mark .parametrize (
672
- "url, expected" ,
673
- [
674
- ("xpto.com" , False ),
675
- ("https://fake/" , False ),
676
- ("https://fake/url" , True ),
677
- ("https://fake/url/something.md" , True ),
678
- ]
679
- )
672
+ "url, expected" ,
673
+ [
674
+ ("xpto.com" , False ),
675
+ ("https://fake/" , False ),
676
+ ("https://fake/url" , True ),
677
+ ("https://fake/url/something.md" , True ),
678
+ ]
679
+ )
680
680
def test_is_url_verified (self , db_session , url , expected ):
681
681
project = DBProjectFactory .create ()
682
682
release = DBReleaseFactory .create (project = project )
Original file line number Diff line number Diff line change @@ -402,19 +402,21 @@ def latest_version(self):
402
402
403
403
def is_verified_url (self , url : str ) -> bool :
404
404
return (
405
- orm .object_session (self )
406
- .query (File .Event )
407
- .join (File )
408
- .join (Release )
409
- .join (Project )
410
- .filter (Project .id == self .id )
411
- .filter (
412
- literal (url ).ilike (File .Event .additional .op ("->>" )("publisher_url" )+ "%" )
405
+ orm .object_session (self )
406
+ .query (File .Event )
407
+ .join (File )
408
+ .join (Release )
409
+ .join (Project )
410
+ .filter (Project .id == self .id )
411
+ .filter (
412
+ literal (url ).ilike (
413
+ File .Event .additional .op ("->>" )("publisher_url" ) + "%"
413
414
)
414
- .scalar ()
415
+ )
416
+ .scalar ()
415
417
) is not None
416
-
417
-
418
+
419
+
418
420
class DependencyKind (enum .IntEnum ):
419
421
requires = 1
420
422
provides = 2
You can’t perform that action at this time.
0 commit comments