mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Spelling (#214)
* spelling: ancillary * spelling: antarctica * spelling: australia * spelling: authentication * spelling: continental * spelling: constructor * spelling: conversion * spelling: creation * spelling: doesn't * spelling: easily * spelling: efficiently * spelling: equivalent * spelling: essentially * spelling: everything * spelling: exactly * spelling: be * spelling: expensive * spelling: supports * spelling: healthcheck * spelling: immediately * spelling: ignored * spelling: invocation * spelling: itself * spelling: leftovers * spelling: missing * spelling: natural * spelling: nonexistent * spelling: peculiarities * spelling: pointing This change hit a line length limitation, so I'm wrapping it and adding a period which appears to match local style... * spelling: quicker * spelling: response * spelling: requested * spelling: redirect * spelling: traffic * spelling: unknown * spelling: uploaded * spelling: useful * spelling: separately * spelling: zone
This commit is contained in:
committed by
Ross McFarland
parent
dbc592bb4d
commit
5d2ba2e715
+1
-1
@@ -60,7 +60,7 @@ better in the future :fingers_crossed:
|
||||
|
||||
#### Miscellaneous
|
||||
|
||||
* Use a 3rd party lib for nautrual sorting of keys, rather than my old
|
||||
* Use a 3rd party lib for natural sorting of keys, rather than my old
|
||||
implementation. Sorting can be disabled in the YamlProvider with
|
||||
`enforce_order: False`.
|
||||
* Semi-colon/escaping fixes and improvements.
|
||||
|
||||
+4
-4
@@ -53,11 +53,11 @@ The geo labels breakdown based on:
|
||||
|
||||
1.
|
||||
- 'AF': 14, # Continental Africa
|
||||
- 'AN': 17, # Continental Antartica
|
||||
- 'AS': 15, # Contentinal Asia
|
||||
- 'EU': 13, # Contentinal Europe
|
||||
- 'AN': 17, # Continental Antarctica
|
||||
- 'AS': 15, # Continental Asia
|
||||
- 'EU': 13, # Continental Europe
|
||||
- 'NA': 11, # Continental North America
|
||||
- 'OC': 16, # Contentinal Austrailia/Oceania
|
||||
- 'OC': 16, # Continental Australia/Oceania
|
||||
- 'SA': 12, # Continental South America
|
||||
|
||||
2. ISO Country Code https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
|
||||
@@ -26,7 +26,7 @@ def main():
|
||||
help='Limit sync to the specified zone(s)')
|
||||
|
||||
# --sources isn't an option here b/c filtering sources out would be super
|
||||
# dangerous since you could eaily end up with an empty zone and delete
|
||||
# dangerous since you could easily end up with an empty zone and delete
|
||||
# everything, or even just part of things when there are multiple sources
|
||||
|
||||
parser.add_argument('--target', default=[], action='append',
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ class MakeThreadFuture(object):
|
||||
|
||||
class MainThreadExecutor(object):
|
||||
'''
|
||||
Dummy executor that runs things on the main thread during the involcation
|
||||
Dummy executor that runs things on the main thread during the invocation
|
||||
of submit, but still returns a future object with the result. This allows
|
||||
code to be written to handle async, even in the case where we don't want to
|
||||
use multiple threads/workers and would prefer that things flow as if
|
||||
|
||||
@@ -39,7 +39,7 @@ class _AzureRecord(object):
|
||||
}
|
||||
|
||||
def __init__(self, resource_group, record, delete=False):
|
||||
'''Contructor for _AzureRecord.
|
||||
'''Constructor for _AzureRecord.
|
||||
|
||||
Notes on Azure records: An Azure record set has the form
|
||||
RecordSet(name=<...>, type=<...>, arecords=[...], aaaa_records, ..)
|
||||
@@ -222,7 +222,7 @@ class AzureProvider(BaseProvider):
|
||||
azuredns:
|
||||
class: octodns.provider.azuredns.AzureProvider
|
||||
client_id: env/AZURE_APPLICATION_ID
|
||||
key: env/AZURE_AUTHENICATION_KEY
|
||||
key: env/AZURE_AUTHENTICATION_KEY
|
||||
directory_id: env/AZURE_DIRECTORY_ID
|
||||
sub_id: env/AZURE_SUBSCRIPTION_ID
|
||||
resource_group: 'TestResource1'
|
||||
|
||||
@@ -30,14 +30,14 @@ class BaseProvider(BaseSource):
|
||||
def _include_change(self, change):
|
||||
'''
|
||||
An opportunity for providers to filter out false positives due to
|
||||
pecularities in their implementation. E.g. minimum TTLs.
|
||||
peculiarities in their implementation. E.g. minimum TTLs.
|
||||
'''
|
||||
return True
|
||||
|
||||
def _extra_changes(self, existing, changes):
|
||||
'''
|
||||
An opportunity for providers to add extra changes to the plan that are
|
||||
necessary to update ancilary record data or configure the zone. E.g.
|
||||
necessary to update ancillary record data or configure the zone. E.g.
|
||||
base NS records.
|
||||
'''
|
||||
return []
|
||||
|
||||
@@ -394,7 +394,7 @@ class CloudflareProvider(BaseProvider):
|
||||
for record in self.zone_records(zone):
|
||||
name = zone.hostname_from_fqdn(record['name'])
|
||||
# Use the _record_for so that we include all of standard
|
||||
# converstion logic
|
||||
# conversion logic
|
||||
r = self._record_for(zone, name, record['type'], [record], True)
|
||||
if hostname == r.name and _type == r._type:
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ class DigitalOceanClient(object):
|
||||
self._request('POST', '/domains', data={'name': name,
|
||||
'ip_address': '192.0.2.1'})
|
||||
|
||||
# After the zone is created, immeadiately delete the record
|
||||
# After the zone is created, immediately delete the record
|
||||
records = self.records(name)
|
||||
for record in records:
|
||||
if record['name'] == '' and record['type'] == 'A':
|
||||
|
||||
@@ -160,7 +160,7 @@ class DnsimpleProvider(BaseProvider):
|
||||
record['content'].split(' ', 5)
|
||||
except ValueError:
|
||||
# their api will let you create invalid records, this
|
||||
# essnetially handles that by ignoring them for values
|
||||
# essentially handles that by ignoring them for values
|
||||
# purposes. That will cause updates to happen to delete them if
|
||||
# they shouldn't exist or update them if they're wrong
|
||||
continue
|
||||
|
||||
@@ -40,7 +40,7 @@ class _CachingDynZone(DynZone):
|
||||
cls.log.debug('get: fetched')
|
||||
except DynectGetError:
|
||||
if not create:
|
||||
cls.log.debug("get: does't exist")
|
||||
cls.log.debug("get: doesn't exist")
|
||||
return None
|
||||
# this value shouldn't really matter, it's not tied to
|
||||
# whois or anything
|
||||
@@ -129,11 +129,11 @@ class DynProvider(BaseProvider):
|
||||
REGION_CODES = {
|
||||
'NA': 11, # Continental North America
|
||||
'SA': 12, # Continental South America
|
||||
'EU': 13, # Contentinal Europe
|
||||
'EU': 13, # Continental Europe
|
||||
'AF': 14, # Continental Africa
|
||||
'AS': 15, # Contentinal Asia
|
||||
'OC': 16, # Contentinal Austrailia/Oceania
|
||||
'AN': 17, # Continental Antartica
|
||||
'AS': 15, # Continental Asia
|
||||
'OC': 16, # Continental Australia/Oceania
|
||||
'AN': 17, # Continental Antarctica
|
||||
}
|
||||
|
||||
_sess_create_lock = Lock()
|
||||
@@ -166,7 +166,7 @@ class DynProvider(BaseProvider):
|
||||
if DynectSession.get_session() is None:
|
||||
# We need to create a new session for this thread and DynectSession
|
||||
# creation is not thread-safe so we have to do the locking. If we
|
||||
# don't and multiple sessions start creattion before the the first
|
||||
# don't and multiple sessions start creation before the the first
|
||||
# has finished (long time b/c it makes http calls) the subsequent
|
||||
# creates will blow away DynectSession._instances, potentially
|
||||
# multiple times if there are multiple creates in flight. Only the
|
||||
@@ -291,7 +291,7 @@ class DynProvider(BaseProvider):
|
||||
try:
|
||||
fqdn, _type = td.label.split(':', 1)
|
||||
except ValueError as e:
|
||||
self.log.warn("Failed to load TraficDirector '%s': %s",
|
||||
self.log.warn("Failed to load TrafficDirector '%s': %s",
|
||||
td.label, e.message)
|
||||
continue
|
||||
tds[fqdn][_type] = td
|
||||
|
||||
@@ -178,7 +178,7 @@ class PowerDnsBaseProvider(BaseProvider):
|
||||
raise Exception('PowerDNS unauthorized host={}'
|
||||
.format(self.host))
|
||||
elif e.response.status_code == 422:
|
||||
# 422 means powerdns doesn't know anything about the requsted
|
||||
# 422 means powerdns doesn't know anything about the requested
|
||||
# domain. We'll just ignore it here and leave the zone
|
||||
# untouched.
|
||||
pass
|
||||
@@ -294,8 +294,8 @@ class PowerDnsBaseProvider(BaseProvider):
|
||||
return []
|
||||
|
||||
# sorting mostly to make things deterministic for testing, but in
|
||||
# theory it let us find what we're after quickier (though sorting would
|
||||
# ve more exepensive.)
|
||||
# theory it let us find what we're after quicker (though sorting would
|
||||
# be more expensive.)
|
||||
for record in sorted(existing.records):
|
||||
if record == ns:
|
||||
# We've found the top-level NS record, return any changes
|
||||
@@ -341,7 +341,7 @@ class PowerDnsBaseProvider(BaseProvider):
|
||||
e.response.text)
|
||||
raise
|
||||
self.log.info('_apply: creating zone=%s', desired.name)
|
||||
# 422 means powerdns doesn't know anything about the requsted
|
||||
# 422 means powerdns doesn't know anything about the requested
|
||||
# domain. We'll try to create it with the correct records instead
|
||||
# of update. Hopefully all the mods are creates :-)
|
||||
data = {
|
||||
|
||||
@@ -61,7 +61,7 @@ class _Route53Record(object):
|
||||
|
||||
# NOTE: we're using __hash__ and __cmp__ methods that consider
|
||||
# _Route53Records equivalent if they have the same class, fqdn, and _type.
|
||||
# Values are ignored. This is usful when computing diffs/changes.
|
||||
# Values are ignored. This is useful when computing diffs/changes.
|
||||
|
||||
def __hash__(self):
|
||||
'sub-classes should never use this method'
|
||||
@@ -679,7 +679,7 @@ class Route53Provider(BaseProvider):
|
||||
.get('CountryCode', False) == '*':
|
||||
# it's a default record
|
||||
continue
|
||||
# we expect a healtcheck now
|
||||
# we expect a healthcheck now
|
||||
try:
|
||||
health_check_id = rrset['HealthCheckId']
|
||||
caller_ref = \
|
||||
@@ -730,7 +730,7 @@ class Route53Provider(BaseProvider):
|
||||
batch_rs_count)
|
||||
# send the batch
|
||||
self._really_apply(batch, zone_id)
|
||||
# start a new batch with the lefovers
|
||||
# start a new batch with the leftovers
|
||||
batch = mods
|
||||
batch_rs_count = mods_rs_count
|
||||
|
||||
|
||||
+1
-1
@@ -151,7 +151,7 @@ class Record(object):
|
||||
|
||||
# NOTE: we're using __hash__ and __cmp__ methods that consider Records
|
||||
# equivalent if they have the same name & _type. Values are ignored. This
|
||||
# is usful when computing diffs/changes.
|
||||
# is useful when computing diffs/changes.
|
||||
|
||||
def __hash__(self):
|
||||
return '{}:{}'.format(self.name, self._type).__hash__()
|
||||
|
||||
@@ -30,7 +30,7 @@ class BaseSource(object):
|
||||
When `lenient` is True the populate call may skip record validation and
|
||||
do a "best effort" load of data. That will allow through some common,
|
||||
but not best practices stuff that we otherwise would reject. E.g. no
|
||||
trailing . or mising escapes for ;.
|
||||
trailing . or missing escapes for ;.
|
||||
'''
|
||||
raise NotImplementedError('Abstract base class, populate method '
|
||||
'missing')
|
||||
|
||||
+2
-2
@@ -37,10 +37,10 @@ class Zone(object):
|
||||
if not name[-1] == '.':
|
||||
raise Exception('Invalid zone name {}, missing ending dot'
|
||||
.format(name))
|
||||
# Force everyting to lowercase just to be safe
|
||||
# Force everything to lowercase just to be safe
|
||||
self.name = unicode(name).lower() if name else name
|
||||
self.sub_zones = sub_zones
|
||||
# We're grouping by node, it allows us to efficently search for
|
||||
# We're grouping by node, it allows us to efficiently search for
|
||||
# duplicates and detect when CNAMEs co-exist with other records
|
||||
self._records = defaultdict(set)
|
||||
# optional leading . to match empty hostname
|
||||
|
||||
+1
-1
@@ -11,4 +11,4 @@ git tag -s v$VERSION -m "Release $VERSION"
|
||||
git push origin v$VERSION
|
||||
echo "Tagged and pushed v$VERSION"
|
||||
python setup.py sdist upload
|
||||
echo "Updloaded $VERSION"
|
||||
echo "Uploaded $VERSION"
|
||||
|
||||
@@ -63,14 +63,14 @@ class TestBaseProvider(TestCase):
|
||||
|
||||
zone = Zone('unit.tests.', [])
|
||||
with self.assertRaises(NotImplementedError) as ctx:
|
||||
HasSupportsGeo('hassupportesgeo').populate(zone)
|
||||
HasSupportsGeo('hassupportsgeo').populate(zone)
|
||||
self.assertEquals('Abstract base class, SUPPORTS property missing',
|
||||
ctx.exception.message)
|
||||
|
||||
class HasSupports(HasSupportsGeo):
|
||||
SUPPORTS = set(('A',))
|
||||
with self.assertRaises(NotImplementedError) as ctx:
|
||||
HasSupports('hassupportes').populate(zone)
|
||||
HasSupports('hassupports').populate(zone)
|
||||
self.assertEquals('Abstract base class, populate method missing',
|
||||
ctx.exception.message)
|
||||
|
||||
@@ -94,7 +94,7 @@ class TestBaseProvider(TestCase):
|
||||
'value': '1.2.3.4'
|
||||
}))
|
||||
|
||||
self.assertTrue(HasSupports('hassupportesgeo')
|
||||
self.assertTrue(HasSupports('hassupportsgeo')
|
||||
.supports(list(zone.records)[0]))
|
||||
|
||||
plan = HasPopulate('haspopulate').plan(zone)
|
||||
|
||||
@@ -599,7 +599,8 @@ class TestCloudflareProvider(TestCase):
|
||||
zone = Zone('unit.tests.', [])
|
||||
provider.populate(zone)
|
||||
|
||||
# the two A records get merged into one CNAME record poining to the CDN
|
||||
# the two A records get merged into one CNAME record pointing to
|
||||
# the CDN.
|
||||
self.assertEquals(3, len(zone.records))
|
||||
|
||||
record = list(zone.records)[0]
|
||||
@@ -621,7 +622,7 @@ class TestCloudflareProvider(TestCase):
|
||||
self.assertEquals('a.unit.tests.cdn.cloudflare.net.', record.value)
|
||||
|
||||
# CDN enabled records can't be updated, we don't know the real values
|
||||
# never point a Cloudflare record to itsself.
|
||||
# never point a Cloudflare record to itself.
|
||||
wanted = Zone('unit.tests.', [])
|
||||
wanted.add_record(Record.new(wanted, 'cname', {
|
||||
'ttl': 300,
|
||||
@@ -676,7 +677,7 @@ class TestCloudflareProvider(TestCase):
|
||||
self.assertEquals('unit.tests.cdn.cloudflare.net.', record.value)
|
||||
|
||||
# CDN enabled records can't be updated, we don't know the real values
|
||||
# never point a Cloudflare record to itsself.
|
||||
# never point a Cloudflare record to itself.
|
||||
wanted = Zone('unit.tests.', [])
|
||||
wanted.add_record(Record.new(wanted, '', {
|
||||
'ttl': 300,
|
||||
|
||||
@@ -491,7 +491,7 @@ class TestDynProviderGeo(TestCase):
|
||||
traffic_director_response = loads(fh.read())
|
||||
|
||||
@property
|
||||
def traffic_directors_reponse(self):
|
||||
def traffic_directors_response(self):
|
||||
return {
|
||||
'data': [{
|
||||
'active': 'Y',
|
||||
@@ -607,7 +607,7 @@ class TestDynProviderGeo(TestCase):
|
||||
mock.side_effect = [{'data': []}]
|
||||
self.assertEquals({}, provider.traffic_directors)
|
||||
|
||||
# a supported td and an ingored one
|
||||
# a supported td and an ignored one
|
||||
response = {
|
||||
'data': [{
|
||||
'active': 'Y',
|
||||
@@ -650,7 +650,7 @@ class TestDynProviderGeo(TestCase):
|
||||
set(tds.keys()))
|
||||
self.assertEquals(['A'], tds['unit.tests.'].keys())
|
||||
self.assertEquals(['A'], tds['geo.unit.tests.'].keys())
|
||||
provider.log.warn.assert_called_with("Failed to load TraficDirector "
|
||||
provider.log.warn.assert_called_with("Failed to load TrafficDirector "
|
||||
"'%s': %s", 'something else',
|
||||
'need more than 1 value to '
|
||||
'unpack')
|
||||
@@ -758,7 +758,7 @@ class TestDynProviderGeo(TestCase):
|
||||
# only traffic director
|
||||
mock.side_effect = [
|
||||
# get traffic directors
|
||||
self.traffic_directors_reponse,
|
||||
self.traffic_directors_response,
|
||||
# get traffic director
|
||||
self.traffic_director_response,
|
||||
# get zone
|
||||
@@ -809,7 +809,7 @@ class TestDynProviderGeo(TestCase):
|
||||
# both traffic director and regular, regular is ignored
|
||||
mock.side_effect = [
|
||||
# get traffic directors
|
||||
self.traffic_directors_reponse,
|
||||
self.traffic_directors_response,
|
||||
# get traffic director
|
||||
self.traffic_director_response,
|
||||
# get zone
|
||||
@@ -859,7 +859,7 @@ class TestDynProviderGeo(TestCase):
|
||||
# busted traffic director
|
||||
mock.side_effect = [
|
||||
# get traffic directors
|
||||
self.traffic_directors_reponse,
|
||||
self.traffic_directors_response,
|
||||
# get traffic director
|
||||
busted_traffic_director_response,
|
||||
# get zone
|
||||
@@ -932,14 +932,14 @@ class TestDynProviderGeo(TestCase):
|
||||
provider = DynProvider('test', 'cust', 'user', 'pass',
|
||||
traffic_directors_enabled=True)
|
||||
|
||||
# will be tested seperately
|
||||
# will be tested separately
|
||||
provider._mod_rulesets = MagicMock()
|
||||
|
||||
mock.side_effect = [
|
||||
# create traffic director
|
||||
self.traffic_director_response,
|
||||
# get traffic directors
|
||||
self.traffic_directors_reponse
|
||||
self.traffic_directors_response
|
||||
]
|
||||
provider._mod_geo_Create(None, Create(self.geo_record))
|
||||
# td now lives in cache
|
||||
|
||||
@@ -361,10 +361,10 @@ class TestGoogleCloudProvider(TestCase):
|
||||
|
||||
# test_zone gets fed the same records as zone does, except it's in
|
||||
# the format returned by google API, so after populate they should look
|
||||
# excactly the same.
|
||||
# exactly the same.
|
||||
self.assertEqual(test_zone.records, zone.records)
|
||||
|
||||
test_zone2 = Zone('nonexistant.zone.', [])
|
||||
test_zone2 = Zone('nonexistent.zone.', [])
|
||||
provider.populate(test_zone2, False, False)
|
||||
|
||||
self.assertEqual(len(test_zone2.records), 0,
|
||||
@@ -401,8 +401,8 @@ class TestGoogleCloudProvider(TestCase):
|
||||
provider.gcloud_client.list_zones = Mock(
|
||||
return_value=DummyIterator([]))
|
||||
|
||||
self.assertIsNone(provider.gcloud_zones.get("nonexistant.xone"),
|
||||
msg="Check that nonexistant zones return None when"
|
||||
self.assertIsNone(provider.gcloud_zones.get("nonexistent.zone"),
|
||||
msg="Check that nonexistent zones return None when"
|
||||
"there's no create=True flag")
|
||||
|
||||
def test__get_rrsets(self):
|
||||
@@ -423,7 +423,7 @@ class TestGoogleCloudProvider(TestCase):
|
||||
provider.gcloud_client.list_zones = Mock(
|
||||
return_value=DummyIterator([]))
|
||||
|
||||
mock_zone = provider._create_gcloud_zone("nonexistant.zone.mock")
|
||||
mock_zone = provider._create_gcloud_zone("nonexistent.zone.mock")
|
||||
|
||||
mock_zone.create.assert_called()
|
||||
provider.gcloud_client.zone.assert_called()
|
||||
|
||||
@@ -199,14 +199,14 @@ class TestOvhProvider(TestCase):
|
||||
api_record.append({
|
||||
'fieldType': 'SPF',
|
||||
'ttl': 1000,
|
||||
'target': 'v=spf1 include:unit.texts.rerirect ~all',
|
||||
'target': 'v=spf1 include:unit.texts.redirect ~all',
|
||||
'subDomain': '',
|
||||
'id': 13
|
||||
})
|
||||
expected.add(Record.new(zone, '', {
|
||||
'ttl': 1000,
|
||||
'type': 'SPF',
|
||||
'value': 'v=spf1 include:unit.texts.rerirect ~all'
|
||||
'value': 'v=spf1 include:unit.texts.redirect ~all'
|
||||
}))
|
||||
|
||||
# SSHFP
|
||||
@@ -404,7 +404,7 @@ class TestOvhProvider(TestCase):
|
||||
call(u'/domain/zone/unit.tests/record', fieldType=u'SPF',
|
||||
subDomain=u'', ttl=1000,
|
||||
target=u'v=spf1 include:unit.texts.'
|
||||
u'rerirect ~all',
|
||||
u'redirect ~all',
|
||||
),
|
||||
call(u'/domain/zone/unit.tests/record', fieldType=u'A',
|
||||
subDomain='sub', target=u'1.2.3.4', ttl=200),
|
||||
|
||||
@@ -100,7 +100,7 @@ class TestPowerDnsProvider(TestCase):
|
||||
# No existing records -> creates for every record in expected
|
||||
with requests_mock() as mock:
|
||||
mock.get(ANY, status_code=200, text=EMPTY_TEXT)
|
||||
# post 201, is reponse to the create with data
|
||||
# post 201, is response to the create with data
|
||||
mock.patch(ANY, status_code=201, text=assert_rrsets_callback)
|
||||
|
||||
plan = provider.plan(expected)
|
||||
@@ -118,7 +118,7 @@ class TestPowerDnsProvider(TestCase):
|
||||
mock.get(ANY, status_code=422, text='')
|
||||
# patch 422's, unknown zone
|
||||
mock.patch(ANY, status_code=422, text=dumps(not_found))
|
||||
# post 201, is reponse to the create with data
|
||||
# post 201, is response to the create with data
|
||||
mock.post(ANY, status_code=201, text=assert_rrsets_callback)
|
||||
|
||||
plan = provider.plan(expected)
|
||||
|
||||
@@ -331,9 +331,9 @@ class TestRoute53Provider(TestCase):
|
||||
stubber.assert_no_pending_responses()
|
||||
|
||||
# Populate a zone that doesn't exist
|
||||
noexist = Zone('does.not.exist.', [])
|
||||
provider.populate(noexist)
|
||||
self.assertEquals(set(), noexist.records)
|
||||
nonexistent = Zone('does.not.exist.', [])
|
||||
provider.populate(nonexistent)
|
||||
self.assertEquals(set(), nonexistent.records)
|
||||
|
||||
def test_sync(self):
|
||||
provider, stubber = self._get_stubbed_provider()
|
||||
|
||||
@@ -430,7 +430,7 @@ class TestRecord(TestCase):
|
||||
self.assertEqual(change.new, other)
|
||||
|
||||
# full sorting
|
||||
# equivilent
|
||||
# equivalent
|
||||
b_naptr_value = b.values[0]
|
||||
self.assertEquals(0, b_naptr_value.__cmp__(b_naptr_value))
|
||||
# by order
|
||||
@@ -710,7 +710,7 @@ class TestRecord(TestCase):
|
||||
Record.new(self.zone, 'unknown', {})
|
||||
self.assertTrue('missing type' in ctx.exception.message)
|
||||
|
||||
# Unkown type
|
||||
# Unknown type
|
||||
with self.assertRaises(Exception) as ctx:
|
||||
Record.new(self.zone, 'unknown', {
|
||||
'type': 'XXX',
|
||||
|
||||
Reference in New Issue
Block a user