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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix imports from iiblib [CLOUDDST-3064] #15

Merged
merged 1 commit into from
Oct 19, 2020
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
8 changes: 3 additions & 5 deletions pubtools/iib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
import sys
import pkg_resources

from iiblib import iibclient
from iiblib import iib_client, iib_authentication
from pubtools import pulplib

from iiblib.iibclient import IIBBuildDetailsModel


def setup_iib_client(parsed_args):
iib_auth = iibclient.IIBKrbAuth(
iib_auth = iib_authentication.IIBKrbAuth(
parsed_args.iib_krb_principal,
parsed_args.iib_server,
ktfile=parsed_args.iib_krb_ktfile,
Expand All @@ -21,7 +19,7 @@ def setup_iib_client(parsed_args):
}
if parsed_args.iib_insecure:
kwargs["ssl_verify"] = False
iibc = iibclient.IIBClient(parsed_args.iib_server, **kwargs)
iibc = iib_client.IIBClient(parsed_args.iib_server, **kwargs)
return iibc


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ setuptools
pyrsistent<=0.16.0; python_version == '2.7'
pushcollector
pubtools-pulp
iiblib>=0.9.0
iiblib>=0.13.0
pubtools-pulplib
6 changes: 3 additions & 3 deletions tests/test_iib_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import pushcollector


from iiblib.iibclient import IIBBuildDetailsModel
from iiblib.iib_build_details_model import IIBBuildDetailsModel
from pubtools.pulplib import ContainerImageRepository
from more_executors.futures import f_return

Expand Down Expand Up @@ -65,7 +65,7 @@ def setup_entry_point_py(entry_tuple, environ_vars):

@pytest.fixture
def fixture_iib_client():
with mock.patch("iiblib.iibclient.IIBClient") as iibc_patched:
with mock.patch("iiblib.iib_client.IIBClient") as iibc_patched:
iibc_patched.return_value.add_bundles.side_effect = (
lambda *args, **kwargs: IIBBuildDetailsModel.from_dict(
fake_tm.setup_task(*args, **kwargs)
Expand Down Expand Up @@ -97,7 +97,7 @@ def fixture_pushcollector():

@pytest.fixture
def fixture_iib_krb_auth():
with mock.patch("iiblib.iibclient.IIBKrbAuth") as iib_krbauth_patched:
with mock.patch("iiblib.iib_authentication.IIBKrbAuth") as iib_krbauth_patched:
iib_krbauth_patched.return_value = mock.MagicMock(name="MockedIIBKrbAuth")
yield iib_krbauth_patched

Expand Down
3 changes: 0 additions & 3 deletions tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from iiblib.iibclient import IIBBuildDetailsModel


class FakeTaskManager(object):
def __init__(self):
self.tasks = {}
Expand Down