Browse Source

Replaced conditional imports with six

pull/732/head
blanariu 5 years ago
parent
commit
efc4d99d8d
1 changed files with 3 additions and 9 deletions
  1. +3
    -9
      tests/test_octodns_provider_ultra.py

+ 3
- 9
tests/test_octodns_provider_ultra.py View File

@ -1,17 +1,11 @@
from __future__ import unicode_literals
try:
# Python 3
from urllib.parse import parse_qs
except ImportError:
# Python 2
from urlparse import parse_qs
from mock import Mock, call
from os.path import dirname, join
from requests import HTTPError
from requests_mock import ANY, mock as requests_mock
from six import text_type
from six.moves.urllib import parse
from unittest import TestCase
from json import load as json_load
@ -64,8 +58,8 @@ class TestUltraProvider(TestCase):
self.assertEquals(1, mock.call_count)
expected_payload = "grant_type=password&username=user&"\
"password=rightpass"
self.assertEquals(parse_qs(mock.last_request.text),
parse_qs(expected_payload))
self.assertEquals(parse.parse_qs(mock.last_request.text),
parse.parse_qs(expected_payload))
def test_get_zones(self):
provider = _get_provider()


Loading…
Cancel
Save