diff --git a/python/ycm/server/tests/get_completions_test.py b/python/ycm/server/tests/get_completions_test.py index 7cb6962e..9607dc36 100644 --- a/python/ycm/server/tests/get_completions_test.py +++ b/python/ycm/server/tests/get_completions_test.py @@ -173,16 +173,6 @@ def GetCompletions_CsCompleter_DoesntStartWithAmbiguousMultipleSolutions_test(): # the test passes if we caught an exception when trying to start it, # so raise one if it managed to start if not exception_caught: - # Now for some cleanup: wait for the server to start then shut it down - while True: - result = app.post_json( '/run_completer_command', - BuildRequest( completer_target = 'filetype_default', - command_arguments = ['ServerRunning'], - filetype = 'cs' ) ).json - if result: - break - time.sleep( 0.2 ) - StopOmniSharpServer( app ) raise Exception( ('The Omnisharp server started, despite us not being able ' 'to find a suitable solution file to feed it. Did you ' diff --git a/python/ycm/utils.py b/python/ycm/utils.py index f320ca1a..b557dc04 100644 --- a/python/ycm/utils.py +++ b/python/ycm/utils.py @@ -219,7 +219,8 @@ def ContentHexHmacValid( content, hmac, hmac_secret ): def CreateHexHmac( content, hmac_secret ): - return hmac.new( hmac_secret, + # Must ensure that hmac_secret is str and not unicode + return hmac.new( str( hmac_secret ), msg = content, digestmod = hashlib.sha256 ).hexdigest()