Dec
25
awarded Popular Question
Nov
17
awarded Notable Question
Jul
2
awarded Curious
Jun
16
awarded Yearling
May
12
comment How can I check exchange, queue and topics in QPID like Rabbitmq does?
@Pendlimarri's thanks, will try your advice
May
3
asked JS Regex for a word which is not contained in <a>?
Mar
29
asked why `tasklist | find "cmd.exe"` doesn't work on win7 but xp and vista?
Jan
14
asked How could a https site enable external http link without warning from browser?
Jan
11
comment How to assert a dict contains another dict without assertDictContainsSubset in python?
great, thanks for your answer. :)
Jan
11
accepted How to assert a dict contains another dict without assertDictContainsSubset in python?
Jan
11
comment How to assert a dict contains another dict without assertDictContainsSubset in python?
This works for me, and it's straightforward. Thanks, and items() is equals to iteritems() right?
Jan
11
asked How to assert a dict contains another dict without assertDictContainsSubset in python?
Dec
24
asked How asp.net website supports https(ssl)?
Dec
20
comment Can I mock a method with specified parameters by using `mock` in python?
thank you very much.
Dec
20
accepted Can I mock a method with specified parameters by using `mock` in python?
Dec
2
asked Can I mock a method with specified parameters by using `mock` in python?
Dec
2
accepted How to load my fake module every time when `import a real module` in python?
Dec
2
comment How to load my fake module every time when `import a real module` in python?
before all of the codes, use this: sys.modules['powervc.common.client'] = mock.MagicMock()
Dec
2
comment How to load my fake module every time when `import a real module` in python?
OK, I finally find a way for this:
Nov
29
comment How to load my fake module every time when `import a real module` in python?
thanks for update, but seems you still didn't catch me, here in your my/functions.py, the cleaner and worker is not methods like cleaner() and worker(), it's a import statement. The difference is, if it's a method, it will not be loaded when you import my.functions, but if it's a import statement, it will automatically load and execute the class when import my.functions. My purpose is to replace the behavior of import my.functions.cleaner in function.py, let it not executed when load my.functions. Do you have any idea?
1 2 3 4 5