66import responses
77
88from dynatademand .api import DemandAPIClient
9- from dynatademand .errors import DemandAPIError
109
1110BASE_HOST = "http://test-url.example"
1211
@@ -20,7 +19,9 @@ def test_get_templates(self):
2019 # Tests getting all templates.
2120 with open ('./tests/test_files/get_templates.json' , 'r' ) as options :
2221 options_json = json .load (options )
23- responses .add (responses .GET , '{}/sample/v1/templates/quotaplan/{}/{}' .format (BASE_HOST , 'US' , 'en' ), json = options_json , status = 200 )
22+ responses .add (responses .GET , '{}/sample/v1/templates/quotaplan/{}/{}' .format (BASE_HOST , 'US' , 'en' ),
23+ json = options_json ,
24+ status = 200 )
2425 self .api .get_templates ('US' , 'en' )
2526 self .assertEqual (len (responses .calls ), 1 )
2627
@@ -65,8 +66,7 @@ def test_update_template(self):
6566 # Test success response
6667 self .api .update_template (1 , new_template_data )
6768 self .assertEqual (len (responses .calls ), 1 )
68-
69-
69+
7070 @responses .activate
7171 def test_delete_template (self ):
7272 # Tests deleteing templates
@@ -85,4 +85,4 @@ def test_delete_template(self):
8585 )
8686 # Test successful response
8787 self .api .delete_template (1 )
88- self .assertEqual (len (responses .calls ), 1 )
88+ self .assertEqual (len (responses .calls ), 1 )
0 commit comments