File tree Expand file tree Collapse file tree 2 files changed +7
-17
lines changed
Expand file tree Collapse file tree 2 files changed +7
-17
lines changed Original file line number Diff line number Diff line change 33"""
44Python client for the Rosette API.
55
6- Copyright (c) 2014-2015 Basis Technology Corporation.
6+ Copyright (c) 2014-2017 Basis Technology Corporation.
77
88Licensed under the Apache License, Version 2.0 (the "License");
99you may not use this file except in compliance with the License.
@@ -278,7 +278,7 @@ class NameDeduplicationParameters(_DocumentParamSetBase):
278278 """Parameter object for C{name-deduplication} endpoint.
279279 Required:
280280 C{names} A list of C{name} objects
281- C{threshold} Threshold to use to restrict cluster size
281+ C{threshold} Threshold to use to restrict cluster size. Can be null to use default value.
282282 """
283283
284284 def __init__ (self ):
@@ -287,12 +287,11 @@ def __init__(self):
287287
288288 def validate (self ):
289289 """Internal. Do not use."""
290- for option in ("names" , "threshold" ): # required
291- if self [option ] is None :
292- raise RosetteException (
293- "missingParameter" ,
294- "Required Name De-Duplication parameter, " + option + ", not supplied" ,
295- repr (option ))
290+ if self ["names" ] is None : # required
291+ raise RosetteException (
292+ "missingParameter" ,
293+ "Required Name De-Duplication parameter, names, not supplied" ,
294+ repr ("names" ))
296295
297296
298297class EndpointCaller :
Original file line number Diff line number Diff line change @@ -462,15 +462,6 @@ def test_name_deduplicatation_parameters(api, json_response):
462462
463463 params ["names" ] = ["John Smith" , "Johnathon Smith" , "Fred Jones" ]
464464
465- with pytest .raises (RosetteException ) as e_rosette :
466- result = api .name_deduplication (params )
467-
468- assert e_rosette .value .status == 'missingParameter'
469- assert e_rosette .value .message == ('Required Name De-Duplication parameter,'
470- ' threshold, not supplied' )
471-
472- params ["threshold" ] = 0.75
473-
474465 result = api .name_deduplication (params )
475466 assert result ["name" ] == "Rosette API"
476467
You can’t perform that action at this time.
0 commit comments