def setUp(self): testclock._seconds_reset() pokermemcache.memcache = pokermemcache.MemcacheMockup pokermemcache.memcache_singleton.clear() pokermemcache.memcache_expiration_singleton.clear() self.destroyDb() self.initServer()
def setUp(self): testclock._seconds_reset() pokermemcache.memcache = pokermemcache.MemcacheMockup pokermemcache.memcache_singleton = {} self.destroyDb() self.initServer() self.initProxy()
def setUp(self): testclock._seconds_reset() self.destroyDb() self.settings = settings = pokernetworkconfig.Config([]) settings.doc = libxml2.parseMemory(settings_xml, len(settings_xml)) settings.header = settings.doc.xpathNewContext() self.db = pokerdatabase.PokerDatabase(settings) self.service = pokerservice.PokerService(settings) self.default_money = 10000000
def setUp(self): testclock._seconds_reset() random.seed(1) settings = pokernetworkconfig.Config([]) settings.doc = libxml2.parseMemory(settings_xml, len(settings_xml)) settings.header = settings.doc.xpathNewContext() self.service = MockService(settings) self.clients = {} self.tourney = None
def setUp(self): testclock._seconds_reset() pokermemcache.memcache = pokermemcache.MemcacheMockup pokermemcache.memcache_singleton = {} pokermemcache.memcache_singleton_expiration = {} pokermemcache.memcache_singleton_log = [] self.destroyDb() self.initServer() self.initExplain() self.initProxy()
def setUp(self): testclock._seconds_reset() settings_xml = """<?xml version="1.0" encoding="ISO-8859-1"?> <server verbose="6" /> """ self.settings = pokernetworkconfig.Config([]) self.settings.loadFromString(settings_xml) pokermemcache.memcache = pokermemcache.MemcacheMockup self.service = PokerServiceMockup() self.site = pokersite.PokerSite(self.settings, pokersite.PokerAvatarResource(self.service))
def setUp(self): testclock._seconds_reset() settings_xml = """<?xml version="1.0" encoding="ISO-8859-1"?> <server verbose="6" /> """ self.settings = pokernetworkconfig.Config([]) self.settings.loadFromString(settings_xml) pokermemcache.memcache = pokermemcache.MemcacheMockup self.service = PokerServiceMockup() self.site = pokersite.PokerSite( self.settings, pokersite.PokerAvatarResource(self.service))
def setUp(self): testclock._seconds_reset() settings_xml = """<?xml version="1.0" encoding="UTF-8"?> <server verbose="6" /> """ self.settings = pokernetworkconfig.Config([]) self.settings.loadFromString(settings_xml) pokermemcache.memcache = pokermemcache.MemcacheMockup pokermemcache.memcache_singleton.clear() pokermemcache.memcache_expiration_singleton.clear() self.service = PokerServiceMockup() self.site = pokersite.PokerSite(self.settings, pokersite.PokerTourneyStartResource(self.service))
def setUp(self): testclock._seconds_reset() settings_xml = """<?xml version="1.0" encoding="UTF-8"?> <server verbose="6" > <rest_filter>tests.finishedfilter</rest_filter> </server> """ % { 'tests_path': TESTS_PATH } self.settings = pokernetworkconfig.Config([]) self.settings.loadFromString(settings_xml) pokermemcache.memcache = pokermemcache.MemcacheMockup self.service = PokerServiceMockup() self.site = pokersite.PokerSite(self.settings, pokersite.PokerResource(self.service))
def setUp(self): testclock._seconds_reset() settings_xml = """<?xml version="1.0" encoding="ISO-8859-1"?> <server verbose="6" /> """ self.settings = pokernetworkconfig.Config([]) self.settings.loadFromString(settings_xml) pokermemcache.memcache = pokermemcache.MemcacheMockup pokermemcache.memcache_singleton.clear() pokermemcache.memcache_expiration_singleton.clear() self.service = PokerServiceMockup() self.site = pokersite.PokerSite(self.settings, pokersite.PokerImageUpload(self.service)) self.image_data = "image data" def parse_multipart_mockup(content, dict): return {'filename':[self.image_data]} self.cgi_parse_multipart = cgi.parse_multipart cgi.parse_multipart = parse_multipart_mockup
def setUp(self): testclock._seconds_reset() settings_xml = """<?xml version="1.0" encoding="ISO-8859-1"?> <server verbose="6" /> """ self.settings = pokernetworkconfig.Config([]) self.settings.loadFromString(settings_xml) pokermemcache.memcache = pokermemcache.MemcacheMockup pokermemcache.memcache_singleton.clear() pokermemcache.memcache_expiration_singleton.clear() self.service = PokerServiceMockup() self.site = pokersite.PokerSite( self.settings, pokersite.PokerImageUpload(self.service)) self.image_data = "image data" def parse_multipart_mockup(content, dict): return {'filename': [self.image_data]} self.cgi_parse_multipart = cgi.parse_multipart cgi.parse_multipart = parse_multipart_mockup