Skip to content

Commit

Permalink
MAINT: few more manual touch-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
bsipocz committed Nov 1, 2022
1 parent d82bb9a commit 675fde5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions pyvo/io/vosi/tests/test_capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ def test_mirrors_parsed(self, parsed_caps):
assert len(parsed_caps[3].interfaces[0].mirrorurls) == 2

def test_mirrors_have_titles(self, parsed_caps):
assert [m.title for m in parsed_caps[3].interfaces[0].mirrorurls
] == ["https version", "Paris mirror"]
assert ([m.title for m in parsed_caps[3].interfaces[0].mirrorurls]
== ["https version", "Paris mirror"])

def test_mirrors_have_urls(self, parsed_caps):
assert [m.content for m in parsed_caps[3].interfaces[0].mirrorurls
] == ['https://example.org/tap', 'https://paris.example.org/tap']
assert ([m.content for m in parsed_caps[3].interfaces[0].mirrorurls]
== ['https://example.org/tap', 'https://paris.example.org/tap'])

def test_testquerystring_parsed(self, parsed_caps):
assert (parsed_caps[3].interfaces[0].testquerystring.content
Expand Down
7 changes: 3 additions & 4 deletions pyvo/registry/tests/test_rtcons.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ def test_basic(self):
def test_interesting_literal(self):
assert rtcons.Freetext("α Cen's planets").get_search_condition() == (
"ivoid IN (SELECT ivoid FROM rr.resource WHERE 1=ivo_hasword(res_description, 'α Cen''s planets')"
" UNION SELECT ivoid FROM rr.resource WHERE 1=ivo_hasword(res_title, 'α Cen''s planets') "
"UNION SELECT ivoid FROM rr.res_subject WHERE res_subject ILIKE '%α Cen''s planets%')")
" UNION SELECT ivoid FROM rr.resource WHERE 1=ivo_hasword(res_title, 'α Cen''s planets')"
" UNION SELECT ivoid FROM rr.res_subject WHERE res_subject ILIKE '%α Cen''s planets%')")


class TestAuthorConstraint:
Expand Down Expand Up @@ -282,8 +282,7 @@ class TestWhereClauseBuilding:
@staticmethod
def where_clause_for(*args, **kwargs):
cons = list(args) + rtcons.keywords_to_constraints(kwargs)
return rtcons.build_regtap_query(cons
).split("\nWHERE\n", 1)[1].split("\nGROUP BY\n")[0]
return rtcons.build_regtap_query(cons).split("\nWHERE\n", 1)[1].split("\nGROUP BY\n")[0]

@pytest.mark.usefixtures('messenger_vocabulary')
def test_from_constraints(self):
Expand Down

0 comments on commit 675fde5

Please sign in to comment.