1717import watson_developer_cloud
1818from watson_developer_cloud import WatsonException
1919from watson_developer_cloud import WatsonApiException
20- from watson_developer_cloud .conversation_v1 import *
20+ from watson_developer_cloud .conversation_v1 import Counterexample , CounterexampleCollection , Entity , EntityCollection , Example , ExampleCollection , Intent , IntentCollection , Synonym , SynonymCollection , Value , ValueCollection , Workspace , WorkspaceCollection
2121
2222platform_url = 'https://gateway.watsonplatform.net'
2323service_path = '/conversation/api'
@@ -51,7 +51,7 @@ def test_create_counterexample():
5151 assert responses .calls [0 ].request .url .startswith (url )
5252 assert counterexample == response
5353 # Verify that response can be converted to a Counterexample
54- counterexample_model = Counterexample ._from_dict (counterexample )
54+ Counterexample ._from_dict (counterexample )
5555
5656@responses .activate
5757def test_rate_limit_exceeded ():
@@ -113,7 +113,7 @@ def test_delete_counterexample():
113113 workspace_id = 'boguswid' , text = 'I want financial advice today' )
114114 assert len (responses .calls ) == 1
115115 assert responses .calls [0 ].request .url .startswith (url )
116- assert counterexample == None
116+ assert counterexample is None
117117
118118
119119@responses .activate
@@ -140,7 +140,7 @@ def test_get_counterexample():
140140 assert responses .calls [0 ].request .url .startswith (url )
141141 assert counterexample == response
142142 # Verify that response can be converted to a Counterexample
143- counterexample_model = Counterexample ._from_dict (counterexample )
143+ Counterexample ._from_dict (counterexample )
144144
145145@responses .activate
146146def test_list_counterexamples ():
@@ -176,7 +176,7 @@ def test_list_counterexamples():
176176 assert responses .calls [0 ].request .url .startswith (url )
177177 assert counterexamples == response
178178 # Verify that response can be converted to a CounterexampleCollection
179- counterexamples_model = CounterexampleCollection ._from_dict (counterexamples )
179+ CounterexampleCollection ._from_dict (counterexamples )
180180
181181@responses .activate
182182def test_update_counterexample ():
@@ -204,7 +204,7 @@ def test_update_counterexample():
204204 assert responses .calls [0 ].request .url .startswith (url )
205205 assert counterexample == response
206206 # Verify that response can be converted to a Counterexample
207- counterexample_model = Counterexample ._from_dict (counterexample )
207+ Counterexample ._from_dict (counterexample )
208208
209209#########################
210210# entities
@@ -243,7 +243,7 @@ def test_create_entity():
243243 assert responses .calls [0 ].request .url .startswith (url )
244244 assert entity == response
245245 # Verify that response can be converted to an Entity
246- entity_model = Entity ._from_dict (entity )
246+ Entity ._from_dict (entity )
247247
248248@responses .activate
249249def test_delete_entity ():
@@ -261,7 +261,7 @@ def test_delete_entity():
261261 entity = service .delete_entity (workspace_id = 'boguswid' , entity = 'pizza_toppings' )
262262 assert len (responses .calls ) == 1
263263 assert responses .calls [0 ].request .url .startswith (url )
264- assert entity == None
264+ assert entity is None
265265
266266
267267@responses .activate
@@ -290,7 +290,7 @@ def test_get_entity():
290290 assert responses .calls [0 ].request .url .startswith (url )
291291 assert entity == response
292292 # Verify that response can be converted to an Entity
293- entity_model = Entity ._from_dict (entity )
293+ Entity ._from_dict (entity )
294294
295295
296296@responses .activate
@@ -333,7 +333,7 @@ def test_list_entities():
333333 assert responses .calls [0 ].request .url .startswith (url )
334334 assert entities == response
335335 # Verify that response can be converted to an EntityCollection
336- entities_model = EntityCollection ._from_dict (entities )
336+ EntityCollection ._from_dict (entities )
337337
338338
339339@responses .activate
@@ -365,7 +365,7 @@ def test_update_entity():
365365 assert responses .calls [0 ].request .url .startswith (url )
366366 assert entity == response
367367 # Verify that response can be converted to an Entity
368- entity_model = Entity ._from_dict (entity )
368+ Entity ._from_dict (entity )
369369
370370
371371#########################
@@ -399,7 +399,7 @@ def test_create_example():
399399 assert responses .calls [0 ].request .url .startswith (url )
400400 assert example == response
401401 # Verify that response can be converted to an Example
402- example_model = Example ._from_dict (example )
402+ Example ._from_dict (example )
403403
404404
405405@responses .activate
@@ -422,7 +422,7 @@ def test_delete_example():
422422 text = 'Gimme a pizza with pepperoni' )
423423 assert len (responses .calls ) == 1
424424 assert responses .calls [0 ].request .url .startswith (url )
425- assert example == None
425+ assert example is None
426426
427427
428428@responses .activate
@@ -451,7 +451,7 @@ def test_get_example():
451451 assert responses .calls [0 ].request .url .startswith (url )
452452 assert example == response
453453 # Verify that response can be converted to an Example
454- example_model = Example ._from_dict (example )
454+ Example ._from_dict (example )
455455
456456
457457@responses .activate
@@ -490,7 +490,7 @@ def test_list_examples():
490490 assert responses .calls [0 ].request .url .startswith (url )
491491 assert examples == response
492492 # Verify that response can be converted to an ExampleCollection
493- examples_model = ExampleCollection ._from_dict (examples )
493+ ExampleCollection ._from_dict (examples )
494494
495495
496496@responses .activate
@@ -520,7 +520,7 @@ def test_update_example():
520520 assert responses .calls [0 ].request .url .startswith (url )
521521 assert example == response
522522 # Verify that response can be converted to an Example
523- example_model = Example ._from_dict (example )
523+ Example ._from_dict (example )
524524
525525
526526#########################
@@ -554,7 +554,7 @@ def test_create_intent():
554554 assert responses .calls [0 ].request .url .startswith (url )
555555 assert intent == response
556556 # Verify that response can be converted to an Intent
557- intent_model = Intent ._from_dict (intent )
557+ Intent ._from_dict (intent )
558558
559559
560560@responses .activate
@@ -575,7 +575,7 @@ def test_delete_intent():
575575 workspace_id = 'boguswid' , intent = 'pizza_order' )
576576 assert len (responses .calls ) == 1
577577 assert responses .calls [0 ].request .url .startswith (url )
578- assert intent == None
578+ assert intent is None
579579
580580
581581@responses .activate
@@ -603,7 +603,7 @@ def test_get_intent():
603603 assert responses .calls [0 ].request .url .startswith (url )
604604 assert intent == response
605605 # Verify that response can be converted to an Intent
606- intent_model = Intent ._from_dict (intent )
606+ Intent ._from_dict (intent )
607607
608608@responses .activate
609609def test_list_intents ():
@@ -636,7 +636,7 @@ def test_list_intents():
636636 assert responses .calls [0 ].request .url .startswith (url )
637637 assert intents == response
638638 # Verify that response can be converted to an IntentCollection
639- intents_model = IntentCollection ._from_dict (intents )
639+ IntentCollection ._from_dict (intents )
640640
641641@responses .activate
642642def test_update_intent ():
@@ -666,7 +666,7 @@ def test_update_intent():
666666 assert responses .calls [0 ].request .url .startswith (url )
667667 assert intent == response
668668 # Verify that response can be converted to an Intent
669- intent_model = Intent ._from_dict (intent )
669+ Intent ._from_dict (intent )
670670
671671#########################
672672# logs
@@ -851,7 +851,7 @@ def test_create_synonym():
851851 assert responses .calls [0 ].request .url .startswith (url )
852852 assert synonym == response
853853 # Verify that response can be converted to a Synonym
854- synonym_model = Synonym ._from_dict (synonym )
854+ Synonym ._from_dict (synonym )
855855
856856@responses .activate
857857def test_delete_synonym ():
@@ -871,7 +871,7 @@ def test_delete_synonym():
871871 workspace_id = 'boguswid' , entity = 'aeiou' , value = 'vowel' , synonym = 'a' )
872872 assert len (responses .calls ) == 1
873873 assert responses .calls [0 ].request .url .startswith (url )
874- assert synonym == None
874+ assert synonym is None
875875
876876
877877@responses .activate
@@ -898,7 +898,7 @@ def test_get_synonym():
898898 assert responses .calls [0 ].request .url .startswith (url )
899899 assert synonym == response
900900 # Verify that response can be converted to a Synonym
901- synonym_model = Synonym ._from_dict (synonym )
901+ Synonym ._from_dict (synonym )
902902
903903
904904@responses .activate
@@ -943,7 +943,7 @@ def test_list_synonyms():
943943 assert responses .calls [0 ].request .url .startswith (url )
944944 assert synonyms == response
945945 # Verify that response can be converted to a SynonymCollection
946- synonyms_model = SynonymCollection ._from_dict (synonyms )
946+ SynonymCollection ._from_dict (synonyms )
947947
948948
949949@responses .activate
@@ -970,7 +970,7 @@ def test_update_synonym():
970970 assert responses .calls [0 ].request .url .startswith (url )
971971 assert synonym == response
972972 # Verify that response can be converted to a Synonym
973- synonym_model = Synonym ._from_dict (synonym )
973+ Synonym ._from_dict (synonym )
974974
975975
976976#########################
@@ -1005,7 +1005,7 @@ def test_create_value():
10051005 assert responses .calls [0 ].request .url .startswith (url )
10061006 assert value == response
10071007 # Verify that response can be converted to a Value
1008- value_model = Value ._from_dict (value )
1008+ Value ._from_dict (value )
10091009
10101010
10111011@responses .activate
@@ -1026,7 +1026,7 @@ def test_delete_value():
10261026 workspace_id = 'boguswid' , entity = 'grilling' , value = 'bbq' )
10271027 assert len (responses .calls ) == 1
10281028 assert responses .calls [0 ].request .url .startswith (url )
1029- assert value == None
1029+ assert value is None
10301030
10311031
10321032@responses .activate
@@ -1057,7 +1057,7 @@ def test_get_value():
10571057 assert responses .calls [0 ].request .url .startswith (url )
10581058 assert value == response
10591059 # Verify that response can be converted to a Value
1060- value_model = Value ._from_dict (value )
1060+ Value ._from_dict (value )
10611061
10621062
10631063@responses .activate
@@ -1101,7 +1101,7 @@ def test_list_values():
11011101 assert responses .calls [0 ].request .url .startswith (url )
11021102 assert values == response
11031103 # Verify that response can be converted to a ValueCollection
1104- values_model = ValueCollection ._from_dict (values )
1104+ ValueCollection ._from_dict (values )
11051105
11061106
11071107@responses .activate
@@ -1137,7 +1137,7 @@ def test_update_value():
11371137 assert responses .calls [0 ].request .url .startswith (url )
11381138 assert value == response
11391139 # Verify that response can be converted to a Value
1140- value_model = Value ._from_dict (value )
1140+ Value ._from_dict (value )
11411141
11421142
11431143#########################
@@ -1172,7 +1172,7 @@ def test_create_workspace():
11721172 assert responses .calls [0 ].request .url .startswith (url )
11731173 assert workspace == response
11741174 # Verify that response can be converted to a Workspace
1175- workspace_model = Workspace ._from_dict (workspace )
1175+ Workspace ._from_dict (workspace )
11761176
11771177@responses .activate
11781178def test_delete_workspace ():
@@ -1190,7 +1190,7 @@ def test_delete_workspace():
11901190 workspace = service .delete_workspace (workspace_id = 'boguswid' )
11911191 assert len (responses .calls ) == 1
11921192 assert responses .calls [0 ].request .url .startswith (url )
1193- assert workspace == None
1193+ assert workspace is None
11941194
11951195
11961196@responses .activate
@@ -1221,7 +1221,7 @@ def test_get_workspace():
12211221 assert responses .calls [0 ].request .url .startswith (url )
12221222 assert workspace == response
12231223 # Verify that response can be converted to a Workspace
1224- workspace_model = Workspace ._from_dict (workspace )
1224+ Workspace ._from_dict (workspace )
12251225
12261226
12271227@responses .activate
@@ -1258,7 +1258,7 @@ def test_list_workspaces():
12581258 assert responses .calls [0 ].request .url .startswith (url )
12591259 assert workspaces == response
12601260 # Verify that response can be converted to a WorkspaceCollection
1261- workspaces_model = WorkspaceCollection ._from_dict (workspaces )
1261+ WorkspaceCollection ._from_dict (workspaces )
12621262
12631263
12641264@responses .activate
@@ -1292,4 +1292,4 @@ def test_update_workspace():
12921292 assert responses .calls [0 ].request .url .startswith (url )
12931293 assert workspace == response
12941294 # Verify that response can be converted to a Workspace
1295- workspace_model = Workspace ._from_dict (workspace )
1295+ Workspace ._from_dict (workspace )
0 commit comments