Skip to content

Commit

Permalink
fix: remove six (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
busunkim96 committed Sep 20, 2021
1 parent a848d54 commit 152b9c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
12 changes: 6 additions & 6 deletions tests/unit/test__http.py
Expand Up @@ -33,8 +33,8 @@ def test_default_url(self):
self.assertIs(conn._client, client)

def test_build_api_url_no_extra_query_params(self):
from six.moves.urllib.parse import parse_qsl
from six.moves.urllib.parse import urlsplit
from urllib.parse import parse_qsl
from urllib.parse import urlsplit

conn = self._make_one(object())
uri = conn.build_api_url("/foo")
Expand All @@ -47,8 +47,8 @@ def test_build_api_url_no_extra_query_params(self):
self.assertEqual(parms, {})

def test_build_api_url_w_custom_endpoint(self):
from six.moves.urllib.parse import parse_qsl
from six.moves.urllib.parse import urlsplit
from urllib.parse import parse_qsl
from urllib.parse import urlsplit

custom_endpoint = "https://foo-runtimeconfig.googleapis.com"
conn = self._make_one(object(), api_endpoint=custom_endpoint)
Expand All @@ -62,8 +62,8 @@ def test_build_api_url_w_custom_endpoint(self):
self.assertEqual(parms, {})

def test_build_api_url_w_extra_query_params(self):
from six.moves.urllib.parse import parse_qsl
from six.moves.urllib.parse import urlsplit
from urllib.parse import parse_qsl
from urllib.parse import urlsplit

conn = self._make_one(object())
uri = conn.build_api_url("/foo", {"bar": "baz"})
Expand Down
10 changes: 3 additions & 7 deletions tests/unit/test_config.py
Expand Up @@ -212,14 +212,12 @@ def test_get_variable_w_alternate_client(self):
self.assertEqual(req["path"], "/%s" % (VARIABLE_PATH,))

def test_list_variables_empty(self):
import six

conn = _Connection({})
client = _Client(project=self.PROJECT, connection=conn)
config = self._make_one(name=self.CONFIG_NAME, client=client)

iterator = config.list_variables()
page = six.next(iterator.pages)
page = next(iterator.pages)
variables = list(page)
token = iterator.next_page_token

Expand All @@ -232,7 +230,6 @@ def test_list_variables_empty(self):
self.assertEqual(req["path"], "/%s" % (PATH,))

def test_list_variables_defaults(self):
import six
from google.cloud._helpers import _rfc3339_to_datetime
from google.cloud.runtimeconfig.variable import Variable

Expand All @@ -259,7 +256,7 @@ def test_list_variables_defaults(self):
config = self._make_one(name=self.CONFIG_NAME, client=client)

iterator = config.list_variables()
page = six.next(iterator.pages)
page = next(iterator.pages)
variables = list(page)
token = iterator.next_page_token

Expand All @@ -279,7 +276,6 @@ def test_list_variables_defaults(self):
self.assertNotIn("filter", req["query_params"])

def test_list_variables_explicit(self):
import six
from google.cloud._helpers import _rfc3339_to_datetime
from google.cloud.runtimeconfig.variable import Variable

Expand All @@ -305,7 +301,7 @@ def test_list_variables_explicit(self):
config = self._make_one(name=self.CONFIG_NAME, client=client)

iterator = config.list_variables(page_size=3, page_token=TOKEN, client=client)
page = six.next(iterator.pages)
page = next(iterator.pages)
variables = list(page)
token = iterator.next_page_token

Expand Down

0 comments on commit 152b9c6

Please sign in to comment.