Last active
December 16, 2015 05:39
-
-
Save jay-zhuang/5385516 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# overrider the class functions for test only | |
MyClass.ConnectServer = lambda *a, **kw: None | |
# simple lambda functions to override real function | |
def test_connection(): | |
run_connection_fun(lambda: False) | |
run_connection_fun(lambda: True) | |
def run_connection_fun(connect_fun) | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment