Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove six #105

Merged
merged 1 commit into from Sep 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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