Example #1
0
 def testRBLCheckWithInvalidHeaderValues(self):
     headers = {}
     headers['client_address'] = 'foo'
     settings = Settings()
     rbl = RBL(headers, settings)
     rbl.servers = self.servers
     self.failUnlessRaises(socket.gaierror, rbl.do_test)
Example #2
0
 def testRBLCheckWithValidHeaders(self):
     headers = {}
     headers['client_address'] = '67.207.130.103'
     result_dict = {'dul.dnsbl.sorbs.net': None}
     rbl = RBL(headers, Settings())
     rbl.servers = self.servers
     rbl.do_test()
     self.assertEqual(result_dict, rbl.results)
Example #3
0
 def testRBLCheckWithEmptyHeaders(self):
     rbl = RBL(settings=Settings())
     rbl.servers = self.servers
     self.failUnlessRaises(GLPluginException, rbl.do_test)