File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ class Meta:
150
150
model = DistributionTree
151
151
fields = (
152
152
"pulp_href" ,
153
+ "prn" ,
153
154
"header_version" ,
154
155
"release_name" ,
155
156
"release_short" ,
Original file line number Diff line number Diff line change
1
+ import pytest
2
+ import requests
3
+
4
+
5
+
6
+ # @pytest.fixture(scope="session")
7
+ # def pulp_openapi_schema_rpm(pulp_api_v3_url):
8
+ # COMPONENT="rpm"
9
+ # return requests.get(f"{pulp_api_v3_url}docs/api.json?bindings&component={COMPONENT}").json()
10
+
11
+ @pytest .mark .parallel
12
+ def test_prn_schema (pulp_openapi_schema ):
13
+ """Test that PRN is a part of every serializer with a pulp_href."""
14
+ failed = []
15
+ for name , schema in pulp_openapi_schema ["components" ]["schemas" ].items ():
16
+ if name .endswith ("Response" ):
17
+ if "pulp_href" in schema ["properties" ]:
18
+ if "prn" in schema ["properties" ]:
19
+ prn_schema = schema ["properties" ]["prn" ]
20
+ if prn_schema ["type" ] == "string" and prn_schema ["readOnly" ]:
21
+ continue
22
+ failed .append (name )
23
+
24
+ assert len (failed ) == 0
You can’t perform that action at this time.
0 commit comments