Skip to content
Permalink
Browse files
fix: remove six (#105)
  • Loading branch information
busunkim96 committed Sep 20, 2021
1 parent a848d54 commit 152b9c6316c2dcc482106997b6ee6944ee6d0245
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
@@ -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")
@@ -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)
@@ -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"})
@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

0 comments on commit 152b9c6

Please sign in to comment.