Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added cloud_sql_proxy
Binary file not shown.
3 changes: 3 additions & 0 deletions compatibility_lib/compatibility_lib/compatibility_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def __init__(self,
mysql_user=None,
mysql_password=None,
mysql_host=None,
mysql_port=3306,
mysql_unix_socket=None,
mysql_db=None):
if mysql_user is None:
Expand All @@ -146,6 +147,7 @@ def __init__(self,
self.mysql_user = mysql_user
self.mysql_password = mysql_password
self.mysql_host = mysql_host
self.mysql_port = mysql_port
self.mysql_unix_socket = mysql_unix_socket
self.mysql_db = mysql_db

Expand All @@ -163,6 +165,7 @@ def connect(self):
else:
conn = pymysql.connect(
host=self.mysql_host,
port=self.mysql_port,
user=self.mysql_user,
password=self.mysql_password,
db=_DATABASE_NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def setUp(self):

fake_value = [[{'dependency_info': _get_dep_info(False)}]]
self._checker = mock.Mock()
self._checker.get_self_compatibility.return_value = fake_value
self._checker.get_compatibility.return_value = fake_value

def setup_test__get_update_priority(self):
low = dependency_highlighter.PriorityLevel.LOW_PRIORITY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def setUp(self):
self.mock_checker = mock.Mock(autospec=True)
self.fake_store = fake_compatibility_store.CompatibilityStore()

self.mock_checker.get_self_compatibility.return_value = \
self.mock_checker.get_compatibility.return_value = \
self.SELF_COMP_RES

def test_constructor_default(self):
Expand Down
2 changes: 1 addition & 1 deletion compatibility_lib/compatibility_lib/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def check(self, packages, python_version):
'dependency_info': DEP_INFO,
}

def get_self_compatibility(self, python_version, packages=None):
def get_compatibility(self, python_version, packages=None):
return [[self.check(
packages=packages, python_version=python_version)]]

Expand Down
4 changes: 2 additions & 2 deletions compatibility_lib/compatibility_lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ def _get_from_endpoint(self, package_name):
a dict mapping from dependency package name (string) to
the info (dict)
"""
_result = self.checker.get_self_compatibility(
self.py_version, [package_name])
_result = self.checker.get_compatibility(
python_version=self.py_version, packages=[package_name])
result = [item for item in _result]
depinfo = result[0][0].get('dependency_info')

Expand Down