def test_welcomePage(self): """ Test the GET request """ logs = load(open_log_file('welcom_page.json')) self.request.form['requests'] = logs # replay the request player = getMultiAdapter((self.portal, self.request), name='requests_player') response = player.playRequests() self.assertTrue("There are currently no active content rules" in response)
def setup(self): # Import requests. if hasattr(self.request, 'datafile'): self.requests = load(self.request.datafile) # But sometimes we do not want to import http requests. else: # The 'list' is used due to a compatibility with the 'load' function. self.requests = [ALLOWED_INPUT_PARAMS]
def setup(self): # Import requests. if hasattr(self.request, "datafile"): self.requests = load(self.request.datafile) # But sometimes we do not want to import http requests. else: # The 'list' is used due to a compatibility with the 'load' function. self.requests = [ALLOWED_INPUT_PARAMS]
def replay(self, logname): """ Replay the log file and store changes """ logs = load(open_log_file(logname)) self.request.form['requests'] = logs # replay the request player = getMultiAdapter((self.portal, self.request), name='requests_player') response = player.playRequests() # apply request transaction.commit() return response
def test_welcomePage(self): """ Test the GET request """ logs = load(open_log_file('welcom_page.json')) self.request.form['requests'] = logs # replay the request player = getMultiAdapter((self.portal, self.request), name='requests_player') response = player.playRequests() self.assertTrue( "There are currently no active content rules" in response)