Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
cf30d056
Commit
cf30d056
authored
Apr 13, 2020
by
Arun Babu Neelicattu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: ensure legacy repo mock uses unique url
parent
f8bde0e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
tests/puzzle/test_solver.py
+5
-5
tests/repositories/test_legacy_repository.py
+4
-4
No files found.
tests/puzzle/test_solver.py
View file @
cf30d056
...
...
@@ -1683,7 +1683,7 @@ def test_solver_chooses_from_correct_repository_if_forced(
ops
,
[{
"job"
:
"install"
,
"package"
:
get_package
(
"tomlkit"
,
"0.5.2"
)}]
)
assert
"http://foo.bar"
==
ops
[
0
]
.
package
.
source_url
assert
"http://
legacy.
foo.bar"
==
ops
[
0
]
.
package
.
source_url
def
test_solver_chooses_from_correct_repository_if_forced_and_transitive_dependency
(
...
...
@@ -1711,7 +1711,7 @@ def test_solver_chooses_from_correct_repository_if_forced_and_transitive_depende
],
)
assert
"http://foo.bar"
==
ops
[
0
]
.
package
.
source_url
assert
"http://
legacy.
foo.bar"
==
ops
[
0
]
.
package
.
source_url
assert
""
==
ops
[
1
]
.
package
.
source_type
assert
""
==
ops
[
1
]
.
package
.
source_url
...
...
@@ -1740,10 +1740,10 @@ def test_solver_does_not_choose_from_secondary_repository_by_default(
],
)
assert
"http://foo.bar"
==
ops
[
0
]
.
package
.
source_url
assert
"http://
legacy.
foo.bar"
==
ops
[
0
]
.
package
.
source_url
assert
""
==
ops
[
1
]
.
package
.
source_type
assert
""
==
ops
[
1
]
.
package
.
source_url
assert
"http://foo.bar"
==
ops
[
2
]
.
package
.
source_url
assert
"http://
legacy.
foo.bar"
==
ops
[
2
]
.
package
.
source_url
def
test_solver_chooses_from_secondary_if_explicit
(
package
,
installed
,
locked
,
io
):
...
...
@@ -1767,7 +1767,7 @@ def test_solver_chooses_from_secondary_if_explicit(package, installed, locked, i
],
)
assert
"http://foo.bar"
==
ops
[
0
]
.
package
.
source_url
assert
"http://
legacy.
foo.bar"
==
ops
[
0
]
.
package
.
source_url
assert
""
==
ops
[
1
]
.
package
.
source_type
assert
""
==
ops
[
1
]
.
package
.
source_url
assert
""
==
ops
[
2
]
.
package
.
source_type
...
...
tests/repositories/test_legacy_repository.py
View file @
cf30d056
...
...
@@ -23,7 +23,7 @@ class MockRepository(LegacyRepository):
def
__init__
(
self
,
auth
=
None
):
super
(
MockRepository
,
self
)
.
__init__
(
"legacy"
,
url
=
"http://foo.bar"
,
auth
=
auth
,
disable_cache
=
True
"legacy"
,
url
=
"http://
legacy.
foo.bar"
,
auth
=
auth
,
disable_cache
=
True
)
def
_get
(
self
,
endpoint
):
...
...
@@ -50,7 +50,7 @@ def test_page_relative_links_path_are_correct():
page
=
repo
.
_get
(
"/relative"
)
for
link
in
page
.
links
:
assert
link
.
netloc
==
"foo.bar"
assert
link
.
netloc
==
"
legacy.
foo.bar"
assert
link
.
path
.
startswith
(
"/relative/poetry"
)
...
...
@@ -267,7 +267,7 @@ def test_get_package_retrieves_packages_with_no_hashes():
def
test_username_password_special_chars
():
auth
=
Auth
(
"http://foo.bar"
,
"user:"
,
"/
%2
Fp@ssword"
)
auth
=
Auth
(
"http://
legacy.
foo.bar"
,
"user:"
,
"/
%2
Fp@ssword"
)
repo
=
MockRepository
(
auth
=
auth
)
assert
"http://user
%3
A:
%2
F
%252
Fp
%40
ssword@foo.bar"
==
repo
.
authenticated_url
assert
"http://user
%3
A:
%2
F
%252
Fp
%40
ssword@
legacy.
foo.bar"
==
repo
.
authenticated_url
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment