-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: RefResolver should not return before calling add_is_codelist
#130
Comments
Once fixed, can use test data at open-contracting/lib-cove-ocds#115 (comment) Here's something I wrote before realizing it was for the wrong issue. ( The fixtures should probably be changed to match the test data at the above issue (i.e. The code in #123 includes a fix for this issue. @pytest.mark.parametrize(
"data_type,json_data",
[
(
"release",
{
"version": "1.1",
"publisher": {"name": ""},
"publishedDate": "2000-01-01T00:00:00Z",
"uri": "https://",
"releases": [
{
"ocid": "ocds-213czf-1",
"id": "1",
"date": "2000-01-01T00:00:00Z",
"tag": ["tender"],
"initiationType": "tender",
"tender": {"id": "1", "procurementMethod": "bad"},
}
],
},
),
(
"record",
{
"version": "1.1",
"publisher": {"name": ""},
"publishedDate": "2000-01-01T00:00:00Z",
"uri": "https://",
"records": [
{
"ocid": "ocds-213czf-1",
"releases": [
{
"ocid": "ocds-213czf-1",
"id": "1",
"date": "2000-01-01T00:00:00Z",
"tag": ["tender"],
"initiationType": "tender",
"tender": {"id": "1", "procurementMethod": "bad"},
}
]
}
],
},
),
(
"release",
{
"version": "1.1",
"publisher": {"name": ""},
"publishedDate": "2000-01-01T00:00:00Z",
"uri": "https://",
"releases": [
{
"ocid": "ocds-213czf-1",
"id": "1",
"date": "2000-01-01T00:00:00Z",
"tag": ["tender"],
"initiationType": "tender",
"tender": {"id": "1", "procurementMethod": "bad"},
}
],
},
),
(
"record",
{
"version": "1.1",
"publisher": {"name": ""},
"publishedDate": "2000-01-01T00:00:00Z",
"uri": "https://",
"records": [
{
"ocid": "ocds-213czf-1",
"releases": [
{
"ocid": "ocds-213czf-1",
"id": "1",
"date": "2000-01-01T00:00:00Z",
"tag": ["tender"],
"initiationType": "tender",
"tender": {"id": "1", "procurementMethod": "bad"},
}
]
}
],
},
),
],
)
def test_iscodelist(data_type, json_data, tmpdir):
schema_obj = get_schema_obj(f"{data_type}-package-schema")
schema_obj.codelists = "https://raw.githubusercontent.com/open-contracting/standard/1.1/schema/codelists/"
context = {"file_type": "json"}
common_checks_context(tmpdir, json_data, schema_obj, "", context)
assert context == {} |
add_is_codelist
add_is_codelist
Bug introduced in 011a2bd
lib-cove/libcove/lib/common.py
Lines 1222 to 1231 in a97f769
The text was updated successfully, but these errors were encountered: