Esempio n. 1
0
class UserScanningTest(unittest.TestCase):
	def setUp(self):
		self.domain = 'gatorhole.com'
		self.p = UserScanning()

	def testSuccessful(self):
		data = {'mx_record': [{'connection_type': 'INET', 'ip': '109.228.153.253', 'host': 'maple.lonn.org', 'prio': '10'}]}
		self.p.setInput('MXRecord', data)
		self.email = '*****@*****.**'
		r = runTestPlugin(self.p, self.domain, self.email)
		status = r.getFinalStatus()

		self.assertEqual(status, Plugin.STATUS_OK)


	def testFailiure(self):
		data = {'mx_record': [{'connection_type': 'INET', 'ip': '109.228.153.253', 'host': 'maple.lonn.org', 'prio': '10'}]}
		self.p.setInput('MXRecord', data)
		self.email = '*****@*****.**'
		r = runTestPlugin(self.p, self.domain, self.email)
		status = r.getFinalStatus()

		self.assertEqual(status, Plugin.STATUS_WARNING)
Esempio n. 2
0
class UserScanningTest(unittest.TestCase):
    def setUp(self):
        self.domain = 'gatorhole.com'
        self.p = UserScanning()

    def testSuccessful(self):
        data = {
            'mx_record': [{
                'connection_type': 'INET',
                'ip': '109.228.153.253',
                'host': 'maple.lonn.org',
                'prio': '10'
            }]
        }
        self.p.setInput('MXRecord', data)
        self.email = '*****@*****.**'
        r = runTestPlugin(self.p, self.domain, self.email)
        status = r.getFinalStatus()

        self.assertEqual(status, Plugin.STATUS_OK)

    def testFailiure(self):
        data = {
            'mx_record': [{
                'connection_type': 'INET',
                'ip': '109.228.153.253',
                'host': 'maple.lonn.org',
                'prio': '10'
            }]
        }
        self.p.setInput('MXRecord', data)
        self.email = '*****@*****.**'
        r = runTestPlugin(self.p, self.domain, self.email)
        status = r.getFinalStatus()

        self.assertEqual(status, Plugin.STATUS_WARNING)
Esempio n. 3
0
 def setUp(self):
     self.domain = 'gatorhole.com'
     self.p = UserScanning()
Esempio n. 4
0
	def setUp(self):
		self.domain = 'gatorhole.com'
		self.p = UserScanning()