mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Replaced conditional imports with six
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user