Skip to content

Commit 9638b0e

Browse files
jobselkomdellweg
authored andcommitted
Merge pull request pulp#877 from jobselko/fix_nightly
Fix tests to account for new fixtures (cherry picked from commit ee1aed2) (cherry picked from commit 7433f61)
1 parent 543e9db commit 9638b0e

File tree

3 files changed

+47
-36
lines changed

3 files changed

+47
-36
lines changed

CHANGES/876.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed tests to account for new fixtures.

pulp_python/tests/functional/api/test_download_content.py

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
PYTHON_MD_PROJECT_SPECIFIER,
1515
PYTHON_MD_FIXTURE_SUMMARY,
1616
PYTHON_LG_FIXTURE_SUMMARY,
17+
PYTHON_LG_FIXTURE_PRERELEASES_SUMMARY,
1718
PYTHON_LG_PROJECT_SPECIFIER,
1819
)
1920
from pulp_python.tests.functional.utils import (
@@ -103,21 +104,25 @@ def test_basic_pulp_to_pulp_sync(self):
103104
cfg.get_content_host_base_url(),
104105
"pulp/content",
105106
distro.base_path,
106-
""
107+
"",
107108
]
108109
unit_url = "/".join(url_fragments)
109110

110111
# Sync using old Pulp content api
111112
body["url"] = unit_url
112113
remote = self._create_remote(**body)
113114
repo2 = self._create_repo_and_sync_with_remote(remote)
114-
self.assertEqual(get_content_summary(repo2.to_dict()), PYTHON_LG_FIXTURE_SUMMARY)
115+
self.assertEqual(
116+
get_content_summary(repo2.to_dict()), PYTHON_LG_FIXTURE_SUMMARY
117+
)
115118

116119
# Sync using new PyPI endpoints
117120
body["url"] = distro.base_url
118121
remote = self._create_remote(**body)
119122
repo3 = self._create_repo_and_sync_with_remote(remote)
120-
self.assertEqual(get_content_summary(repo3.to_dict()), PYTHON_LG_FIXTURE_SUMMARY)
123+
self.assertEqual(
124+
get_content_summary(repo3.to_dict()), PYTHON_LG_FIXTURE_SUMMARY
125+
)
121126

122127
def test_full_fixtures_to_pulp_sync(self):
123128
"""
@@ -126,7 +131,9 @@ def test_full_fixtures_to_pulp_sync(self):
126131
"""
127132
remote = self._create_remote(includes=[], prereleases=True)
128133
repo = self._create_repo_and_sync_with_remote(remote)
129-
self.assertEqual(get_content_summary(repo.to_dict()), PYTHON_LG_FIXTURE_SUMMARY)
134+
self.assertEqual(
135+
get_content_summary(repo.to_dict()), PYTHON_LG_FIXTURE_PRERELEASES_SUMMARY
136+
)
130137

131138
def test_full_pulp_to_pulp_sync(self):
132139
"""
@@ -140,12 +147,18 @@ def test_full_pulp_to_pulp_sync(self):
140147

141148
remote = self._create_remote(includes=[], url=distro.base_url)
142149
repo2 = self._create_repo_and_sync_with_remote(remote)
143-
self.assertEqual(get_content_summary(repo2.to_dict()), PYTHON_MD_FIXTURE_SUMMARY)
150+
self.assertEqual(
151+
get_content_summary(repo2.to_dict()), PYTHON_MD_FIXTURE_SUMMARY
152+
)
144153

145154
# Now test using publication simple pages
146155
pub = self._create_publication(repo)
147156
distro2 = self._create_distribution_from_publication(pub)
148-
remote = self._create_remote(includes=[], url=distro2.base_url, prereleases=True)
157+
remote = self._create_remote(
158+
includes=[], url=distro2.base_url, prereleases=True
159+
)
149160

150161
repo3 = self._create_repo_and_sync_with_remote(remote)
151-
self.assertEqual(get_content_summary(repo3.to_dict()), PYTHON_MD_FIXTURE_SUMMARY)
162+
self.assertEqual(
163+
get_content_summary(repo3.to_dict()), PYTHON_MD_FIXTURE_SUMMARY
164+
)

pulp_python/tests/functional/constants.py

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -113,21 +113,15 @@
113113
"aiohttp-3.2.1.tar.gz": "1b95d53f8dac13898f0a3e4af76f6f36d540fbfaefc4f4c9f43e436fa0e53d22",
114114
"aiohttp-3.2.0.tar.gz": "1be3903fe6a36d20492e74efb326522dd4702bf32b45ffc7acbc0fb34ab240a6",
115115
"Django-1.10.4.tar.gz": "fff7f062e510d812badde7cfc57745b7779edb4d209b2bc5ea8d954c22305c2b",
116-
"Django-1.10.4-py2.py3-none-any.whl":
117-
"a8e1a552205cda15023c39ecf17f7e525e96c5b0142e7879e8bd0c445351f2cc",
116+
"Django-1.10.4-py2.py3-none-any.whl": "a8e1a552205cda15023c39ecf17f7e525e96c5b0142e7879e8bd0c445351f2cc",
118117
"Django-1.10.3.tar.gz": "6f92f08dee8a1bd7680e098a91bf5acd08b5cdfe74137f695b60fd79f4478c30",
119-
"Django-1.10.3-py2.py3-none-any.whl":
120-
"94426cc28d8721fbf13c333053f08d32427671a4ca7986f7030fc82bdf9c88c1",
118+
"Django-1.10.3-py2.py3-none-any.whl": "94426cc28d8721fbf13c333053f08d32427671a4ca7986f7030fc82bdf9c88c1",
121119
"Django-1.10.2.tar.gz": "e127f12a0bfb34843b6e8c82f91e26fff6445a7ca91d222c0794174cf97cbce1",
122-
"Django-1.10.2-py2.py3-none-any.whl":
123-
"4d48ab8e84a7c8b2bc4b2f4f199bc3a8bfcc9cbdbc29e355ac5c44a501d73a1a",
120+
"Django-1.10.2-py2.py3-none-any.whl": "4d48ab8e84a7c8b2bc4b2f4f199bc3a8bfcc9cbdbc29e355ac5c44a501d73a1a",
124121
"Django-1.10.1.tar.gz": "d6e6c5b25cb67f46afd7c82f536529b11981183423dad8932e15bce93d1a24f3",
125-
"Django-1.10.1-py2.py3-none-any.whl":
126-
"3d689905cd0635bbb33b87f9a5df7ca70a3db206faae4ec58cda5e7f5f47050d",
127-
"celery-4.2.0-py2.py3-none-any.whl":
128-
"2082cbd82effa8ac8a8a58977d70bb203a9f362817e3b66f4578117b9f93d8a9",
129-
"celery-4.1.1-py2.py3-none-any.whl":
130-
"6fc4678d1692af97e137b2a9f1c04efd8e7e2fb7134c5c5ad60738cdd927762f",
122+
"Django-1.10.1-py2.py3-none-any.whl": "3d689905cd0635bbb33b87f9a5df7ca70a3db206faae4ec58cda5e7f5f47050d",
123+
"celery-4.2.0-py2.py3-none-any.whl": "2082cbd82effa8ac8a8a58977d70bb203a9f362817e3b66f4578117b9f93d8a9",
124+
"celery-4.1.1-py2.py3-none-any.whl": "6fc4678d1692af97e137b2a9f1c04efd8e7e2fb7134c5c5ad60738cdd927762f",
131125
}
132126

133127
PYTHON_MD_PROJECT_SPECIFIER = [
@@ -145,14 +139,16 @@
145139
"celery", # matches 13
146140
"Django", # matches 31
147141
"scipy", # matches 23
142+
"setuptools", # matches 2
148143
"shelf-reader", # matches 2
149144
]
150-
PYTHON_LG_PACKAGE_COUNT = 76
145+
PYTHON_LG_PACKAGE_COUNT = 78
151146
PYTHON_LG_FIXTURE_SUMMARY = {PYTHON_CONTENT_NAME: PYTHON_LG_PACKAGE_COUNT}
147+
PYTHON_LG_FIXTURE_PRERELEASES_SUMMARY = {PYTHON_CONTENT_NAME: 92}
152148
PYTHON_LG_FIXTURE_COUNTS = {
153-
"latest_3": 35,
154-
"sdist": 23,
155-
"bdist_wheel": 53,
149+
"latest_3": 37,
150+
"sdist": 24,
151+
"bdist_wheel": 54,
156152
}
157153

158154
DJANGO_LATEST_3 = 4 # latest version has 2 dists, each other has 1
@@ -241,11 +237,15 @@
241237
# "provides_dist": [],
242238
# "obsoletes_dist": [],
243239
# "requires_external": [],
244-
"classifiers": ['Development Status :: 4 - Beta', 'Environment :: Console',
245-
'Intended Audience :: Developers',
246-
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
247-
'Natural Language :: English', 'Programming Language :: Python :: 2',
248-
'Programming Language :: Python :: 2.7'],
240+
"classifiers": [
241+
"Development Status :: 4 - Beta",
242+
"Environment :: Console",
243+
"Intended Audience :: Developers",
244+
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
245+
"Natural Language :: English",
246+
"Programming Language :: Python :: 2",
247+
"Programming Language :: Python :: 2.7",
248+
],
249249
"downloads": {"last_day": -1, "last_month": -1, "last_week": -1},
250250
# maybe add description, license is long for this one
251251
}
@@ -281,7 +281,7 @@
281281
"download_concurrency": 3,
282282
"policy": "on_demand",
283283
"prereleases": False,
284-
"excludes": ["example1", "example2"]
284+
"excludes": ["example1", "example2"],
285285
}
286286

287287
BANDERSNATCH_CONF = b"""
@@ -345,7 +345,7 @@
345345
"requires_python": None,
346346
"size": 22455,
347347
"yanked": False,
348-
"yanked_reason": None
348+
"yanked_reason": None,
349349
}
350350

351351
SHELF_SDIST_PYTHON_DOWNLOAD = {
@@ -363,17 +363,14 @@
363363
"requires_python": None,
364364
"size": 19097,
365365
"yanked": False,
366-
"yanked_reason": None
366+
"yanked_reason": None,
367367
}
368368

369369
SHELF_0DOT1_RELEASE = [SHELF_BDIST_PYTHON_DOWNLOAD, SHELF_SDIST_PYTHON_DOWNLOAD]
370370

371371
SHELF_PYTHON_JSON = {
372372
"info": PYTHON_INFO_DATA,
373373
"last_serial": 0,
374-
"releases": {
375-
"0.1": SHELF_0DOT1_RELEASE
376-
},
377-
"urls": SHELF_0DOT1_RELEASE
378-
374+
"releases": {"0.1": SHELF_0DOT1_RELEASE},
375+
"urls": SHELF_0DOT1_RELEASE,
379376
}

0 commit comments

Comments
 (0)