File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,6 +98,26 @@ def wavebandtest_callback(request, content):
9898 yield matcher
9999
100100
101+ @pytest .fixture ()
102+ def datamodel_fixture (mocker ):
103+ def datamodeltest_callback (request , content ):
104+ data = dict (parse_qsl (request .body ))
105+ query = data ['QUERY' ]
106+
107+ assert (
108+ "WHERE idet.detail_xpath = '/capability/dataModel/@ivo-id" in query
109+ )
110+ assert "idet.detail_value, 'ivo://ivoa.net/std/tap%')" in query
111+
112+ return get_pkg_data_contents ('data/regtap.xml' )
113+
114+ with mocker .register_uri (
115+ 'POST' , 'http://dc.g-vo.org/tap/sync' ,
116+ content = datamodeltest_callback
117+ ) as matcher :
118+ yield matcher
119+
120+
101121@pytest .mark .usefixtures ('keywords_fixture' , 'capabilities' )
102122def test_keywords ():
103123 regsearch (keywords = ['vizier' , 'pulsar' ])
@@ -111,3 +131,8 @@ def test_servicetype():
111131@pytest .mark .usefixtures ('waveband_fixture' , 'capabilities' )
112132def test_waveband ():
113133 regsearch (waveband = 'optical' )
134+
135+
136+ @pytest .mark .usefixtures ('datamodel_fixture' , 'capabilities' )
137+ def test_datamodel ():
138+ regsearch (datamodel = 'tap' )
You can’t perform that action at this time.
0 commit comments