示例#1
0
    def test_cname_validation_fail(self):
        record = Record()
        record.type = 'C'
        record.domain_id = 1
        record.host = 'foobar.com'
        record.val = 'www.example.com  '

        with self.assertRaises(RecordValueException) as cm:
            record.validate()
        self.assertEquals('Invalid cname value: www.example.com  ',
                          cm.exception.message)
示例#2
0
    def test_cname_validation_fail(self):
        record = Record()
        record.type = 'C'
        record.domain_id = 1
        record.host = 'foobar.com'
        record.val = 'www.example.com  '

        with self.assertRaises(RecordValueException) as cm:
            record.validate()
        self.assertEquals(
            'Invalid cname value: www.example.com  ',
            cm.exception.message
        )
示例#3
0
    def test_cname_validation_success(self):
        record = Record()
        record.type = 'C'
        record.domain_id = 1
        record.host = 'foobar.com'
        record.val = 'www.example.com'

        self.assertIsNone(record.validate())
示例#4
0
    def test_cname_validation_success(self):
        record = Record()
        record.type = 'C'
        record.domain_id = 1
        record.host = 'foobar.com'
        record.val = 'www.example.com'

        self.assertIsNone(record.validate())