@@ -152,3 +152,31 @@ def test_full_pulp_to_pulp_sync(self):
152152
153153 repo3 = self ._create_repo_and_sync_with_remote (remote )
154154 self .assertEqual (get_content_summary (repo3 .to_dict ()), PYTHON_MD_FIXTURE_SUMMARY )
155+
156+
157+ def test_pulp2pulp_sync_with_oddities (
158+ python_repo_with_sync ,
159+ python_remote_factory ,
160+ python_publication_factory ,
161+ python_distribution_factory ,
162+ python_content_summary ,
163+ ):
164+ """Test that Pulp can handle syncing packages with wierd names."""
165+ remote = python_remote_factory (includes = ["oslo.utils" ], url = "https://pypi.org" )
166+ repo = python_repo_with_sync (remote )
167+ distro = python_distribution_factory (repository = repo )
168+ summary = python_content_summary (repository_version = repo .latest_version_href )
169+ # Test pulp 2 pulp full sync w/ live pypi apis
170+ remote2 = python_remote_factory (includes = [], url = distro .base_url )
171+ repo2 = python_repo_with_sync (remote2 )
172+ summary2 = python_content_summary (repository_version = repo2 .latest_version_href )
173+ assert summary2 .present ["python.python" ]["count" ] > 0
174+ assert summary .present ["python.python" ]["count" ] == summary2 .present ["python.python" ]["count" ]
175+ # Test w/ publication
176+ pub = python_publication_factory (repository = repo )
177+ distro2 = python_distribution_factory (publication = pub )
178+ remote3 = python_remote_factory (includes = [], url = distro2 .base_url )
179+ repo3 = python_repo_with_sync (remote3 )
180+ summary3 = python_content_summary (repository_version = repo3 .latest_version_href )
181+ assert summary3 .present ["python.python" ]["count" ] > 0
182+ assert summary .present ["python.python" ]["count" ] == summary3 .present ["python.python" ]["count" ]
0 commit comments