How do I use Python Mox to check if a method is called with the equivalent of a string? -
How do I use Python Mox to check if a method is called with the equivalent of a string? -
i want check if function beingness called string - seems makes difference if string created using '%s' insert substring. test failing error:
unexpectedmethodcallerror: unexpected method call. unexpected:- expected:+ - foo('hello %s', 'world') -> none ? ------ + foo('hello world') -> none
how check if method beingness called on 'hello world', regardless of how string created?
there no type or class "formatted string" in python. string. think have error in code. mean, fault. bet trying phone call this:
foo('hello %s', 'world')
but should, instead, do
foo('hello %s' % 'world')
which give expected result.
python mox
Comments
Post a Comment