File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 22 parse_cmd_args , checkCAsettings ,
33 checkApplicationPort ,
44 checkBasicAuthsettings ,
5- checkForInvalidsettings )
5+ checkForInvalidsettings ,
6+ checkAPIsettings )
67from source .__version__ import __version__ as version
78from nose2 .tools .decorators import with_setup
89
@@ -225,3 +226,22 @@ def test_case18():
225226 assert not valid1
226227 assert msg == ''
227228 assert len (msg1 ) > 1
229+
230+
231+ @with_setup (my_setup )
232+ def test_case19 ():
233+ z = a .copy ()
234+ del z ['apiKeyName' ]
235+ result = merge_defaults_and_args (a , b )
236+ result1 = merge_defaults_and_args (z , b )
237+ assert len (result .keys ()) > 0
238+ assert len (result1 .keys ()) > 0
239+ assert 'apiKeyValue' not in result .keys ()
240+ assert 'apiKeyValue' not in result1 .keys ()
241+ assert 'apiKeyName' not in result1 .keys ()
242+ valid , msg = checkAPIsettings (result )
243+ valid1 , msg1 = checkAPIsettings (result1 )
244+ assert not valid
245+ assert not valid1
246+ assert msg == 'Missing mandatory ApiKey settings, quitting'
247+ assert msg1 == 'Missing mandatory ApiKey settings, quitting'
You can’t perform that action at this time.
0 commit comments