コード例 #1
0
ファイル: test_check.py プロジェクト: dave-m/domaincheck
    def test_bad_domain(self):
        """Test a known bad domain

        We should get back an empty list

        """
        response = check.get_mx(BAD_DOMAIN)
        self.assertIsInstance(response, list)
        self.assertFalse(response)
コード例 #2
0
ファイル: test_check.py プロジェクト: dave-m/domaincheck
    def test_good_domain(self):
        """Test with a known good domain

        We should get back a sorted list of tuples,
        each of which contain the Exchange (string) and
        preference (int)

        """
        response = check.get_mx(GOOD_DOMAIN)
        self.assertIsInstance(response, list)

        for record in response:
            self.assertIsInstance(record, tuple)
            self.assertIsInstance(record[0], basestring)
            self.assertIsInstance(record[1], int)