ibm_watson 1.0.0.rc2 → 1.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -27
  3. data/lib/ibm_watson/assistant_v1.rb +6 -80
  4. data/lib/ibm_watson/assistant_v2.rb +6 -38
  5. data/lib/ibm_watson/compare_comply_v1.rb +6 -47
  6. data/lib/ibm_watson/discovery_v1.rb +12 -297
  7. data/lib/ibm_watson/language_translator_v3.rb +6 -41
  8. data/lib/ibm_watson/natural_language_classifier_v1.rb +6 -35
  9. data/lib/ibm_watson/natural_language_understanding_v1.rb +6 -38
  10. data/lib/ibm_watson/personality_insights_v3.rb +6 -30
  11. data/lib/ibm_watson/speech_to_text_v1.rb +9 -130
  12. data/lib/ibm_watson/text_to_speech_v1.rb +6 -50
  13. data/lib/ibm_watson/tone_analyzer_v3.rb +6 -31
  14. data/lib/ibm_watson/version.rb +1 -1
  15. data/lib/ibm_watson/visual_recognition_v3.rb +8 -103
  16. data/lib/ibm_watson/websocket/speech_to_text_websocket_listener.rb +5 -5
  17. data/lib/ibm_watson.rb +9 -0
  18. data/test/integration/test_assistant_v1.rb +1 -1
  19. data/test/integration/test_assistant_v2.rb +1 -1
  20. data/test/integration/test_compare_comply_v1.rb +1 -1
  21. data/test/integration/test_discovery_v1.rb +1 -4
  22. data/test/integration/test_language_translator_v3.rb +1 -1
  23. data/test/integration/test_natural_language_classifier_v1.rb +1 -1
  24. data/test/integration/test_natural_language_understanding_v1.rb +1 -1
  25. data/test/integration/test_personality_insights_v3.rb +1 -1
  26. data/test/integration/test_speech_to_text_v1.rb +2 -2
  27. data/test/integration/test_text_to_speech_v1.rb +1 -1
  28. data/test/integration/test_tone_analyzer_v3.rb +1 -1
  29. data/test/integration/test_visual_recognition_v3.rb +1 -8
  30. data/test/unit/test_assistant_v1.rb +45 -45
  31. data/test/unit/test_assistant_v2.rb +3 -3
  32. data/test/unit/test_compare_comply_v1.rb +12 -12
  33. data/test/unit/test_configure_http_client.rb +37 -13
  34. data/test/unit/test_discovery_v1.rb +47 -139
  35. data/test/unit/test_language_translator_v3.rb +13 -26
  36. data/test/unit/test_natural_language_classifier_v1.rb +2 -2
  37. data/test/unit/test_natural_language_understanding_v1.rb +5 -5
  38. data/test/unit/test_personality_insights_v3.rb +8 -8
  39. data/test/unit/test_speech_to_text_v1.rb +21 -21
  40. data/test/unit/test_text_to_speech_v1.rb +5 -5
  41. data/test/unit/test_tone_analyzer_v3.rb +9 -9
  42. data/test/unit/test_vcap_using_personality_insights.rb +8 -8
  43. data/test/unit/test_visual_recognition_v3.rb +8 -75
  44. metadata +4 -4
@@ -46,7 +46,7 @@ class DiscoveryV1Test < Minitest::Test
46
46
  "Host" => "gateway.watsonplatform.net"
47
47
  }
48
48
  ).to_return(status: 200, body: discovery_response_body.to_json, headers: { "Content-Type" => "application/json" })
49
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
49
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
50
50
  username: "username",
51
51
  password: "password"
52
52
  )
@@ -67,7 +67,7 @@ class DiscoveryV1Test < Minitest::Test
67
67
  "Host" => "gateway.watsonplatform.net"
68
68
  }
69
69
  ).to_return(status: 200, body: { "resulting_key" => true }.to_json, headers: { "Content-Type" => "application/json" })
70
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
70
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
71
71
  username: "username",
72
72
  password: "password"
73
73
  )
@@ -92,7 +92,7 @@ class DiscoveryV1Test < Minitest::Test
92
92
  "Host" => "gateway.watsonplatform.net"
93
93
  }
94
94
  ).to_return(status: 200, body: { "resulting_key" => true }.to_json, headers: { "Content-Type" => "application/json" })
95
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
95
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
96
96
  username: "username",
97
97
  password: "password"
98
98
  )
@@ -118,7 +118,7 @@ class DiscoveryV1Test < Minitest::Test
118
118
  "Host" => "gateway.watsonplatform.net"
119
119
  }
120
120
  ).to_return(status: 200, body: { "resulting_key" => true }.to_json, headers: { "Content-Type" => "application/json" })
121
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
121
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
122
122
  username: "username",
123
123
  password: "password"
124
124
  )
@@ -143,7 +143,7 @@ class DiscoveryV1Test < Minitest::Test
143
143
  "Host" => "gateway.watsonplatform.net"
144
144
  }
145
145
  ).to_return(status: 200, body: { "resulting_key" => true }.to_json, headers: { "Content-Type" => "application/json" })
146
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
146
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
147
147
  username: "username",
148
148
  password: "password"
149
149
  )
@@ -166,7 +166,7 @@ class DiscoveryV1Test < Minitest::Test
166
166
  "Host" => "gateway.watsonplatform.net"
167
167
  }
168
168
  ).to_return(status: 200, body: { "body" => "hello" }.to_json, headers: { "Content-Type" => "application/json" })
169
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
169
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
170
170
  username: "username",
171
171
  password: "password"
172
172
  )
@@ -181,7 +181,7 @@ class DiscoveryV1Test < Minitest::Test
181
181
  end
182
182
 
183
183
  def test_collection
184
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
184
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
185
185
  username: "username",
186
186
  password: "password"
187
187
  )
@@ -270,7 +270,7 @@ class DiscoveryV1Test < Minitest::Test
270
270
  end
271
271
 
272
272
  def test_query
273
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
273
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
274
274
  username: "username",
275
275
  password: "password"
276
276
  )
@@ -295,60 +295,6 @@ class DiscoveryV1Test < Minitest::Test
295
295
  assert_equal({ "body" => "hello" }, service_response.result)
296
296
  end
297
297
 
298
- def test_query_relations
299
- stub_request(:post, "https://gateway.watsonplatform.net/discovery/api/v1/environments/envid/collections/collid/query_relations?version=2018-03-05")
300
- .with(
301
- body: "{\"count\":10}",
302
- headers: {
303
- "Accept" => "application/json",
304
- "Authorization" => "Basic dXNlcm5hbWU6cGFzc3dvcmQ=",
305
- "Content-Type" => "application/json",
306
- "Host" => "gateway.watsonplatform.net"
307
- }
308
- ).to_return(status: 200, body: { body: "hello" }.to_json, headers: { "Content-Type" => "application/json" })
309
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
310
- username: "username",
311
- password: "password"
312
- )
313
- service = IBMWatson::DiscoveryV1.new(
314
- version: "2018-03-05",
315
- authenticator: authenticator
316
- )
317
- service_response = service.query_relations(
318
- environment_id: "envid",
319
- collection_id: "collid",
320
- count: 10
321
- )
322
- assert_equal({ "body" => "hello" }, service_response.result)
323
- end
324
-
325
- def test_query_entities
326
- stub_request(:post, "https://gateway.watsonplatform.net/discovery/api/v1/environments/envid/collections/collid/query_entities?version=2018-03-05")
327
- .with(
328
- body: "{\"count\":10}",
329
- headers: {
330
- "Accept" => "application/json",
331
- "Authorization" => "Basic dXNlcm5hbWU6cGFzc3dvcmQ=",
332
- "Content-Type" => "application/json",
333
- "Host" => "gateway.watsonplatform.net"
334
- }
335
- ).to_return(status: 200, body: { body: "hello" }.to_json, headers: { "Content-Type" => "application/json" })
336
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
337
- username: "username",
338
- password: "password"
339
- )
340
- service = IBMWatson::DiscoveryV1.new(
341
- version: "2018-03-05",
342
- authenticator: authenticator
343
- )
344
- service_response = service.query_entities(
345
- environment_id: "envid",
346
- collection_id: "collid",
347
- count: 10
348
- )
349
- assert_equal({ "body" => "hello" }, service_response.result)
350
- end
351
-
352
298
  def test_configs
353
299
  results = {
354
300
  "configurations" => [
@@ -358,7 +304,7 @@ class DiscoveryV1Test < Minitest::Test
358
304
  }
359
305
  ]
360
306
  }
361
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
307
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
362
308
  username: "username",
363
309
  password: "password"
364
310
  )
@@ -442,7 +388,7 @@ class DiscoveryV1Test < Minitest::Test
442
388
  end
443
389
 
444
390
  def test_document
445
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
391
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
446
392
  username: "username",
447
393
  password: "password"
448
394
  )
@@ -450,44 +396,6 @@ class DiscoveryV1Test < Minitest::Test
450
396
  version: "2018-03-05",
451
397
  authenticator: authenticator
452
398
  )
453
- stub_request(:post, "https://gateway.watsonplatform.net/discovery/api/v1/environments/envid/preview?configuration_id=bogus&version=2018-03-05")
454
- .with(
455
- headers: {
456
- "Accept" => "application/json",
457
- "Authorization" => "Basic dXNlcm5hbWU6cGFzc3dvcmQ=",
458
- "Host" => "gateway.watsonplatform.net"
459
- }
460
- ).to_return(status: 200, body: { configurations: [] }.to_json, headers: { "Content-Type" => "application/json" })
461
- File.open(Dir.getwd + "/resources/simple.html") do |file_info|
462
- service_response = service.test_configuration_in_environment(
463
- environment_id: "envid",
464
- configuration_id: "bogus",
465
- file: file_info,
466
- filename: "simple.html"
467
- )
468
- refute(service_response.nil?)
469
-
470
- service_response = service.test_configuration_in_environment(
471
- environment_id: "envid",
472
- configuration_id: "bogus",
473
- file: "file_info"
474
- )
475
- refute(service_response.nil?)
476
-
477
- stub_request(:post, "https://gateway.watsonplatform.net/discovery/api/v1/environments/envid/preview?version=2018-03-05")
478
- .with(
479
- headers: {
480
- "Accept" => "application/json",
481
- "Authorization" => "Basic dXNlcm5hbWU6cGFzc3dvcmQ=",
482
- "Host" => "gateway.watsonplatform.net"
483
- }
484
- ).to_return(status: 200, body: { configurations: [] }.to_json, headers: { "Content-Type" => "application/json" })
485
- service_response = service.test_configuration_in_environment(
486
- environment_id: "envid",
487
- file: file_info
488
- )
489
- refute(service_response.nil?)
490
- end
491
399
  doc_status = {
492
400
  "document_id" => "45556e23-f2b1-449d-8f27-489b514000ff",
493
401
  "configuration_id" => "2e079259-7dd2-40a9-998f-3e716f5a7b88",
@@ -597,7 +505,7 @@ class DiscoveryV1Test < Minitest::Test
597
505
  end
598
506
 
599
507
  def test_delete_all_training_data
600
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
508
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
601
509
  username: "username",
602
510
  password: "password"
603
511
  )
@@ -620,7 +528,7 @@ class DiscoveryV1Test < Minitest::Test
620
528
  end
621
529
 
622
530
  def test_list_training_data
623
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
531
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
624
532
  username: "username",
625
533
  password: "password"
626
534
  )
@@ -687,7 +595,7 @@ class DiscoveryV1Test < Minitest::Test
687
595
  }
688
596
  ]
689
597
  }
690
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
598
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
691
599
  username: "username",
692
600
  password: "password"
693
601
  )
@@ -716,7 +624,7 @@ class DiscoveryV1Test < Minitest::Test
716
624
  end
717
625
 
718
626
  def test_delete_training_data
719
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
627
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
720
628
  username: "username",
721
629
  password: "password"
722
630
  )
@@ -760,7 +668,7 @@ class DiscoveryV1Test < Minitest::Test
760
668
  "Host" => "gateway.watsonplatform.net"
761
669
  }
762
670
  ).to_return(status: 200, body: mock_response.to_json, headers: { "Content-Type" => "application/json" })
763
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
671
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
764
672
  username: "username",
765
673
  password: "password"
766
674
  )
@@ -785,7 +693,7 @@ class DiscoveryV1Test < Minitest::Test
785
693
  "cross_reference" => "string",
786
694
  "relevance" => 0
787
695
  }
788
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
696
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
789
697
  username: "username",
790
698
  password: "password"
791
699
  )
@@ -815,7 +723,7 @@ class DiscoveryV1Test < Minitest::Test
815
723
  end
816
724
 
817
725
  def test_delete_training_example
818
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
726
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
819
727
  username: "username",
820
728
  password: "password"
821
729
  )
@@ -845,7 +753,7 @@ class DiscoveryV1Test < Minitest::Test
845
753
  "cross_reference" => "string",
846
754
  "relevance" => 0
847
755
  }
848
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
756
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
849
757
  username: "username",
850
758
  password: "password"
851
759
  )
@@ -878,7 +786,7 @@ class DiscoveryV1Test < Minitest::Test
878
786
  "cross_reference" => "string",
879
787
  "relevance" => 0
880
788
  }
881
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
789
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
882
790
  username: "username",
883
791
  password: "password"
884
792
  )
@@ -908,7 +816,7 @@ class DiscoveryV1Test < Minitest::Test
908
816
  end
909
817
 
910
818
  def test_expansions
911
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
819
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
912
820
  username: "username",
913
821
  password: "password"
914
822
  )
@@ -967,7 +875,7 @@ class DiscoveryV1Test < Minitest::Test
967
875
  end
968
876
 
969
877
  def test_tokenization_dictionary
970
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
878
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
971
879
  username: "username",
972
880
  password: "password"
973
881
  )
@@ -1026,7 +934,7 @@ class DiscoveryV1Test < Minitest::Test
1026
934
  end
1027
935
 
1028
936
  def test_delete_user_data
1029
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
937
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1030
938
  username: "username",
1031
939
  password: "password"
1032
940
  )
@@ -1048,7 +956,7 @@ class DiscoveryV1Test < Minitest::Test
1048
956
  end
1049
957
 
1050
958
  def test_query_notices
1051
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
959
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1052
960
  username: "username",
1053
961
  password: "password"
1054
962
  )
@@ -1072,7 +980,7 @@ class DiscoveryV1Test < Minitest::Test
1072
980
  end
1073
981
 
1074
982
  def test_federated_query
1075
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
983
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1076
984
  username: "username",
1077
985
  password: "password"
1078
986
  )
@@ -1098,7 +1006,7 @@ class DiscoveryV1Test < Minitest::Test
1098
1006
  end
1099
1007
 
1100
1008
  def test_federated_query_notices
1101
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1009
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1102
1010
  username: "username",
1103
1011
  password: "password"
1104
1012
  )
@@ -1122,7 +1030,7 @@ class DiscoveryV1Test < Minitest::Test
1122
1030
  end
1123
1031
 
1124
1032
  def test_list_training_examples
1125
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1033
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1126
1034
  username: "username",
1127
1035
  password: "password"
1128
1036
  )
@@ -1157,7 +1065,7 @@ class DiscoveryV1Test < Minitest::Test
1157
1065
  "type" => "click",
1158
1066
  "data" => "data"
1159
1067
  }
1160
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1068
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1161
1069
  username: "username",
1162
1070
  password: "password"
1163
1071
  )
@@ -1184,7 +1092,7 @@ class DiscoveryV1Test < Minitest::Test
1184
1092
  end
1185
1093
 
1186
1094
  def test_query_log
1187
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1095
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1188
1096
  username: "username",
1189
1097
  password: "password"
1190
1098
  )
@@ -1209,7 +1117,7 @@ class DiscoveryV1Test < Minitest::Test
1209
1117
  end
1210
1118
 
1211
1119
  def test_metrics_query
1212
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1120
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1213
1121
  username: "username",
1214
1122
  password: "password"
1215
1123
  )
@@ -1234,7 +1142,7 @@ class DiscoveryV1Test < Minitest::Test
1234
1142
  end
1235
1143
 
1236
1144
  def test_metrics_query_event
1237
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1145
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1238
1146
  username: "username",
1239
1147
  password: "password"
1240
1148
  )
@@ -1259,7 +1167,7 @@ class DiscoveryV1Test < Minitest::Test
1259
1167
  end
1260
1168
 
1261
1169
  def test_metrics_query_token_event
1262
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1170
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1263
1171
  username: "username",
1264
1172
  password: "password"
1265
1173
  )
@@ -1283,7 +1191,7 @@ class DiscoveryV1Test < Minitest::Test
1283
1191
  end
1284
1192
 
1285
1193
  def test_metrics_event_rate
1286
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1194
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1287
1195
  username: "username",
1288
1196
  password: "password"
1289
1197
  )
@@ -1308,7 +1216,7 @@ class DiscoveryV1Test < Minitest::Test
1308
1216
  end
1309
1217
 
1310
1218
  def test_metrics_query_no_results
1311
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1219
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1312
1220
  username: "username",
1313
1221
  password: "password"
1314
1222
  )
@@ -1333,7 +1241,7 @@ class DiscoveryV1Test < Minitest::Test
1333
1241
  end
1334
1242
 
1335
1243
  def test_list_credentials
1336
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1244
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1337
1245
  username: "username",
1338
1246
  password: "password"
1339
1247
  )
@@ -1356,7 +1264,7 @@ class DiscoveryV1Test < Minitest::Test
1356
1264
  end
1357
1265
 
1358
1266
  def test_create_credentials
1359
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1267
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1360
1268
  username: "username",
1361
1269
  password: "password"
1362
1270
  )
@@ -1382,7 +1290,7 @@ class DiscoveryV1Test < Minitest::Test
1382
1290
  end
1383
1291
 
1384
1292
  def test_get_credentials
1385
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1293
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1386
1294
  username: "username",
1387
1295
  password: "password"
1388
1296
  )
@@ -1406,7 +1314,7 @@ class DiscoveryV1Test < Minitest::Test
1406
1314
  end
1407
1315
 
1408
1316
  def test_update_credentials
1409
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1317
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1410
1318
  username: "username",
1411
1319
  password: "password"
1412
1320
  )
@@ -1433,7 +1341,7 @@ class DiscoveryV1Test < Minitest::Test
1433
1341
  end
1434
1342
 
1435
1343
  def test_delete_credentials
1436
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1344
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1437
1345
  username: "username",
1438
1346
  password: "password"
1439
1347
  )
@@ -1457,7 +1365,7 @@ class DiscoveryV1Test < Minitest::Test
1457
1365
  end
1458
1366
 
1459
1367
  def test_update_collection
1460
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1368
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1461
1369
  username: "username",
1462
1370
  password: "password"
1463
1371
  )
@@ -1485,7 +1393,7 @@ class DiscoveryV1Test < Minitest::Test
1485
1393
  end
1486
1394
 
1487
1395
  def test_get_stopword_list_status
1488
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1396
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1489
1397
  username: "username",
1490
1398
  password: "password"
1491
1399
  )
@@ -1509,7 +1417,7 @@ class DiscoveryV1Test < Minitest::Test
1509
1417
  end
1510
1418
 
1511
1419
  def test_list_fields
1512
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1420
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1513
1421
  username: "username",
1514
1422
  password: "password"
1515
1423
  )
@@ -1533,7 +1441,7 @@ class DiscoveryV1Test < Minitest::Test
1533
1441
  end
1534
1442
 
1535
1443
  def test_create_stopword_list
1536
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1444
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1537
1445
  username: "username",
1538
1446
  password: "password"
1539
1447
  )
@@ -1555,7 +1463,7 @@ class DiscoveryV1Test < Minitest::Test
1555
1463
  end
1556
1464
 
1557
1465
  def test_delete_stopword_list
1558
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1466
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1559
1467
  username: "username",
1560
1468
  password: "password"
1561
1469
  )
@@ -1578,7 +1486,7 @@ class DiscoveryV1Test < Minitest::Test
1578
1486
  end
1579
1487
 
1580
1488
  def test_list_gateways
1581
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1489
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1582
1490
  username: "username",
1583
1491
  password: "password"
1584
1492
  )
@@ -1601,7 +1509,7 @@ class DiscoveryV1Test < Minitest::Test
1601
1509
  end
1602
1510
 
1603
1511
  def test_create_gateway
1604
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1512
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1605
1513
  username: "username",
1606
1514
  password: "password"
1607
1515
  )
@@ -1624,7 +1532,7 @@ class DiscoveryV1Test < Minitest::Test
1624
1532
  end
1625
1533
 
1626
1534
  def test_get_gateway
1627
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1535
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1628
1536
  username: "username",
1629
1537
  password: "password"
1630
1538
  )
@@ -1648,7 +1556,7 @@ class DiscoveryV1Test < Minitest::Test
1648
1556
  end
1649
1557
 
1650
1558
  def test_delete_gateway
1651
- authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
1559
+ authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
1652
1560
  username: "username",
1653
1561
  password: "password"
1654
1562
  )