File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ def fields(self):
133133
134134 def category (self , name = 'obs_general' ):
135135 '''Get all fields in a category'''
136- return Category (self .load ('category /' + name ))
136+ return Category (self .load ('categories /' + name ))
137137
138138 def categories (self ):
139139 '''List category names'''
File renamed without changes.
Original file line number Diff line number Diff line change @@ -314,15 +314,15 @@ def test_api_fields(api):
314314
315315@responses .activate
316316def test_api_category (api ):
317- category = open ('tests/api/category /obs_general.json' , 'r' ).read ()
317+ category = open ('tests/api/categories /obs_general.json' , 'r' ).read ()
318318 responses .add (responses .GET ,
319- 'http://localhost/category /obs_general.json' ,
319+ 'http://localhost/categories /obs_general.json' ,
320320 body = category )
321321
322322 resp = api .category ('obs_general' )
323323
324324 assert len (responses .calls ) == 1
325- assert responses .calls [0 ].request .url == 'http://localhost/category /obs_general.json'
325+ assert responses .calls [0 ].request .url == 'http://localhost/categories /obs_general.json'
326326 assert responses .calls [0 ].response .text == category
327327
328328 assert resp .name == 'obs_general'
Original file line number Diff line number Diff line change 66
77@pytest .fixture
88def category ():
9- json = JSON .loads (open ('tests/api/category /obs_general.json' , 'r' ).read ())
9+ json = JSON .loads (open ('tests/api/categories /obs_general.json' , 'r' ).read ())
1010 return Category (json )
1111
1212@pytest .fixture
You can’t perform that action at this time.
0 commit comments