Browse Source

Minor test updates for rackspace

pull/165/head
Vietor Davis 9 years ago
parent
commit
21b3ffb509
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      tests/test_octodns_source_rackspace.py

+ 4
- 3
tests/test_octodns_source_rackspace.py View File

@ -91,9 +91,9 @@ class TestRackspaceSource(TestCase):
zone = Zone('unit.tests.', []) zone = Zone('unit.tests.', [])
provider.populate(zone) provider.populate(zone)
self.assertEquals(14, len(zone.records))
self.assertEquals(5, len(zone.records))
changes = expected.changes(zone, provider) changes = expected.changes(zone, provider)
self.assertEquals(0, len(changes))
self.assertEquals(18, len(changes))
# Used in a minute # Used in a minute
def assert_rrsets_callback(request, context): def assert_rrsets_callback(request, context):
@ -103,7 +103,8 @@ class TestRackspaceSource(TestCase):
# No existing records -> creates for every record in expected # No existing records -> creates for every record in expected
with requests_mock() as mock: with requests_mock() as mock:
mock.get(ANY, status_code=200, text=EMPTY_TEXT)
mock.get(re.compile('domains$'), status_code=200, text=LIST_DOMAINS_RESPONSE)
mock.get(re.compile('records'), status_code=200, text=EMPTY_TEXT)
# post 201, is reponse to the create with data # post 201, is reponse to the create with data
mock.patch(ANY, status_code=201, text=assert_rrsets_callback) mock.patch(ANY, status_code=201, text=assert_rrsets_callback)


Loading…
Cancel
Save