Skip to content

Commit 08f1ff7

Browse files
committed
Fix some unit tests.
1 parent 2dd12db commit 08f1ff7

File tree

2 files changed

+2
-132
lines changed

2 files changed

+2
-132
lines changed

tests/data/setup/simple-setup.py-expected.json

Lines changed: 0 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -139,67 +139,6 @@
139139
"datasource_id": null,
140140
"purl": "pkg:pypi/[email protected]"
141141
},
142-
{
143-
"type": "pypi",
144-
"namespace": null,
145-
"name": "boolean-py",
146-
"version": "3.8",
147-
"qualifiers": {},
148-
"subpath": null,
149-
"primary_language": "Python",
150-
"description": "Define boolean algebras, create and parse boolean expressions and create custom boolean DSL.\nThis library helps you deal with boolean expressions and algebra with variables\nand the boolean functions AND, OR, NOT.\n\nYou can parse expressions from strings and simplify and compare expressions.\nYou can also easily create your custom algreba and mini DSL and create custom\ntokenizers to handle custom expressions.\n\nFor extensive documentation look either into the docs directory or view it online, at\nhttps://booleanpy.readthedocs.org/en/latest/\n\nhttps://github.com/bastikr/boolean.py\n\nCopyright (c) 2009-2020 Sebastian Kraemer, [email protected] and others\nSPDX-License-Identifier: BSD-2-Clause",
151-
"release_date": "2020-06-10T22:06:07",
152-
"parties": [
153-
{
154-
"type": "person",
155-
"role": "author",
156-
"name": "Sebastian Kraemer",
157-
"email": "[email protected]",
158-
"url": null
159-
}
160-
],
161-
"keywords": [
162-
"boolean expression",
163-
"boolean algebra",
164-
"logic",
165-
"expression parser",
166-
"Development Status :: 5 - Production/Stable",
167-
"Intended Audience :: Developers",
168-
"Operating System :: OS Independent",
169-
"Programming Language :: Python",
170-
"Programming Language :: Python :: 2.7",
171-
"Programming Language :: Python :: 3",
172-
"Topic :: Scientific/Engineering :: Mathematics",
173-
"Topic :: Software Development :: Compilers",
174-
"Topic :: Software Development :: Libraries",
175-
"Topic :: Utilities"
176-
],
177-
"homepage_url": "https://github.com/bastikr/boolean.py",
178-
"download_url": "https://files.pythonhosted.org/packages/a1/eb/b37ef5647243ade8308f7bb46b1a45e6204790c163cbd8cf6df990d5c1c1/boolean.py-3.8.tar.gz",
179-
"size": 32196,
180-
"sha1": null,
181-
"md5": "83ccc145ba74a585637124c8bc648333",
182-
"sha256": "cc24e20f985d60cd4a3a5a1c0956dd12611159d32a75081dabd0c9ab981acaa4",
183-
"sha512": null,
184-
"bug_tracking_url": null,
185-
"code_view_url": null,
186-
"vcs_url": null,
187-
"copyright": null,
188-
"license_expression": null,
189-
"declared_license": {
190-
"license": "BSD-2-Clause"
191-
},
192-
"notice_text": null,
193-
"source_packages": [],
194-
"file_references": [],
195-
"extra_data": {},
196-
"dependencies": [],
197-
"repository_homepage_url": null,
198-
"repository_download_url": null,
199-
"api_data_url": "https://pypi.org/pypi/boolean-py/3.8/json",
200-
"datasource_id": null,
201-
"purl": "pkg:pypi/[email protected]"
202-
},
203142
{
204143
"type": "pypi",
205144
"namespace": null,
@@ -268,75 +207,6 @@
268207
"api_data_url": "https://pypi.org/pypi/license-expression/1.0/json",
269208
"datasource_id": null,
270209
"purl": "pkg:pypi/[email protected]"
271-
},
272-
{
273-
"type": "pypi",
274-
"namespace": null,
275-
"name": "license-expression",
276-
"version": "1.0",
277-
"qualifiers": {},
278-
"subpath": null,
279-
"primary_language": "Python",
280-
"description": "license-expression is small utility library to parse, compare, simplify and normalize license expressions (such as SPDX license expressions) using boolean logic.",
281-
"release_date": "2019-10-16T17:48:47",
282-
"parties": [
283-
{
284-
"type": "person",
285-
"role": "author",
286-
"name": "nexB Inc.",
287-
"email": "[email protected]",
288-
"url": null
289-
}
290-
],
291-
"keywords": [
292-
"license",
293-
"spdx",
294-
"license expression",
295-
"open source",
296-
"boolean",
297-
"parse expression",
298-
"normalize expression",
299-
"compare expression",
300-
"licence",
301-
"Development Status :: 5 - Production/Stable",
302-
"Intended Audience :: Developers",
303-
"Operating System :: OS Independent",
304-
"Programming Language :: Python",
305-
"Programming Language :: Python :: 2",
306-
"Programming Language :: Python :: 2.7",
307-
"Programming Language :: Python :: 3",
308-
"Programming Language :: Python :: 3.4",
309-
"Programming Language :: Python :: 3.5",
310-
"Topic :: Utilities"
311-
],
312-
"homepage_url": "https://github.com/nexB/license-expression",
313-
"download_url": "https://files.pythonhosted.org/packages/27/71/a8d8d78f7866a75f6a940cc53d1557a5edf1ae4a281fe8797cf36077105d/license-expression-1.0.tar.gz",
314-
"size": 53559,
315-
"sha1": null,
316-
"md5": "81477f779099f55071c6a7b88a29bb01",
317-
"sha256": "8aaa455c5b97c4f2174090178b19792b2a1c620e80591aafd4e0a99b713f9e8d",
318-
"sha512": null,
319-
"bug_tracking_url": null,
320-
"code_view_url": null,
321-
"vcs_url": null,
322-
"copyright": null,
323-
"license_expression": null,
324-
"declared_license": {
325-
"license": "apache-2.0",
326-
"classifiers": [
327-
"License :: OSI Approved :: Apache Software License"
328-
]
329-
},
330-
"notice_text": null,
331-
"source_packages": [],
332-
"file_references": [],
333-
"extra_data": {},
334-
"dependencies": [],
335-
"repository_homepage_url": null,
336-
"repository_download_url": null,
337-
"api_data_url": "https://pypi.org/pypi/license-expression/1.0/json",
338-
"datasource_id": null,
339-
"purl": "pkg:pypi/[email protected]"
340210
}
341211
],
342212
"resolved_dependencies_graph": [

tests/test_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_get_netrc_auth_with_no_matching_url():
5353
async def test_fetch_links(mock_get):
5454
file_name = test_env.get_test_loc("psycopg2.html")
5555
with open(file_name) as file:
56-
mock_get.return_value = file.read()
56+
mock_get.return_value = file.read(), file_name
5757
links = await PypiSimpleRepository().fetch_links(normalized_name="psycopg2")
5858
result_file = test_env.get_temp_file("json")
5959
expected_file = test_env.get_test_loc("psycopg2-links-expected.json", must_exist=False)
@@ -63,7 +63,7 @@ async def test_fetch_links(mock_get):
6363
# Testing relative links
6464
relative_links_file = test_env.get_test_loc("fetch_links_test.html")
6565
with open(relative_links_file) as relative_file:
66-
mock_get.return_value = relative_file.read()
66+
mock_get.return_value = relative_file.read(), relative_links_file
6767
relative_links = await PypiSimpleRepository().fetch_links(normalized_name="sources.whl")
6868
relative_links_result_file = test_env.get_temp_file("json")
6969
relative_links_expected_file = test_env.get_test_loc(

0 commit comments

Comments
 (0)