Skip to content

Commit

Permalink
Fixed wrong imports
Browse files Browse the repository at this point in the history
  • Loading branch information
midnightercz committed Feb 14, 2020
1 parent aa040a8 commit 13bd181
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions tests/fake/test_fake_sync.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
from pubtools.pulplib import FakeController, YumRepository, SyncOptions, PulpException
from pubtools.pulplib import (
FakeController,
YumRepository,
YumSyncOptions,
PulpException,
)


def test_can_sync():
Expand All @@ -12,7 +17,7 @@ def test_can_sync():
repo1 = client.get_repository("repo1")

# Call to sync should succeed
sync_f = repo1.sync(SyncOptions(feed="mock://feed/"))
sync_f = repo1.sync(YumSyncOptions(feed="mock://feed/"))

# The future should resolve successfully
tasks = sync_f.result()
Expand Down Expand Up @@ -44,6 +49,6 @@ def test_sync_absent_raises():
assert repo_copy1.delete().result()

# ...then sync through the other handle becomes impossible
exception = repo_copy2.sync(SyncOptions(feed="mock://feed/")).exception()
exception = repo_copy2.sync(YumSyncOptions(feed="mock://feed/")).exception()
assert isinstance(exception, PulpException)
assert "repo1 not found" in str(exception)
4 changes: 2 additions & 2 deletions tests/repository/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Task,
Distributor,
DetachedException,
SyncOptions,
YumSyncOptions,
TaskFailedException,
)

Expand Down Expand Up @@ -60,7 +60,7 @@ def test_sync_with_options(
repo = YumRepository(id="some-repo")
repo.__dict__["_client"] = client

options = SyncOptions(ssl_validation=False, feed="mock://example.com/")
options = YumSyncOptions(ssl_validation=False, feed="mock://example.com/")

# It should have succeeded, with the tasks as retrieved from Pulp
assert repo.sync(options).result() == [
Expand Down

0 comments on commit 13bd181

Please sign in to comment.