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