Example #1
0
def get_requests(agent_list):
    requests = []
    for agent in agent_list:
        request = DummyRequest(agent)
        
        Middleware.process_request(request)
        
        requests.append(request)
    return requests
Example #2
0
def get_requests(agent_list):
    requests = []
    for agent in agent_list:
        request = DummyRequest(agent)
        
        Middleware.process_request(request)
        
        requests.append(request)
    return requests
Example #3
0
 def testNoUA(self):
     class NoUARequest(object):
         META = {}
     
     request = NoUARequest()
     Middleware.process_request(request)
     
     assert not request.is_android_device
     assert not request.is_kindle_device
     assert not request.is_ios_device
     assert not request.is_touch_device
     assert not request.is_simple_device
     assert not request.is_webkit 
     assert not request.is_webos
     assert request.is_wide_device
     assert not request.is_windows_phone_device