pytest-nhsd-apim 3.3.13__py3-none-any.whl → 3.3.15__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pytest-nhsd-apim might be problematic. Click here for more details.

@@ -39,7 +39,7 @@ class ApigeeProdCredentials(BaseSettings):
39
39
  apigee_nhsd_prod_passcode: Optional[str] = None
40
40
  apigee_access_token: Optional[str] = None
41
41
 
42
- @root_validator(pre=True)
42
+ @root_validator
43
43
  def check_credentials_config(cls, values):
44
44
  print(values)
45
45
  """Checks for the right set of credentials"""
@@ -60,7 +60,7 @@ class ApigeeProdCredentials(BaseSettings):
60
60
  ):
61
61
  values["auth_method"] = "saml"
62
62
  return values
63
- elif values["access_token"]:
63
+ elif values["apigee_access_token"]:
64
64
  values["auth_method"] = "access_token"
65
65
  return values
66
66
  else:
@@ -22,12 +22,23 @@ _SESSION = requests.session()
22
22
 
23
23
  @pytest.fixture()
24
24
  @log_method
25
- def _mock_jwks_api_key(_apigee_app_base_url, _apigee_edge_session, test_app, apigee_environment, _test_app_id):
25
+ def _mock_jwks_api_key(
26
+ _apigee_app_base_url,
27
+ _apigee_edge_session,
28
+ test_app,
29
+ apigee_environment,
30
+ _test_app_id,
31
+ ):
26
32
  # Apps in prod Apigee shouldn't rely on mock-jwks for their api key
27
- if apigee_environment in ["int", "prod"]: return ""
33
+ if apigee_environment in ["dev", "sandbox", "int", "prod"]:
34
+ return ""
28
35
 
29
36
  creds = get_app_credentials_for_product(
30
- _apigee_app_base_url, _apigee_edge_session, test_app(), f"mock-jwks-{apigee_environment}", _test_app_id
37
+ _apigee_app_base_url,
38
+ _apigee_edge_session,
39
+ test_app(),
40
+ f"mock-jwks-{apigee_environment}",
41
+ _test_app_id,
31
42
  )
32
43
  return creds["consumerKey"]
33
44
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytest-nhsd-apim
3
- Version: 3.3.13
3
+ Version: 3.3.15
4
4
  Summary: Pytest plugin accessing NHSDigital's APIM proxies
5
5
  Home-page: https://github.com/NHSDigital/pytest-nhsd-apim
6
6
  Author: Adrian Ciobanita
@@ -1,5 +1,5 @@
1
1
  pytest_nhsd_apim/__init__.py,sha256=CRwQfUDrbXIqvJX6OfTR4jGdhlU9kjGmBAptJasRg7E,72
2
- pytest_nhsd_apim/apigee_apis.py,sha256=b1Ay1MBCdlcy3-QoQhfeFwnGkY2bmYAXJhEzCO1ZK54,57430
2
+ pytest_nhsd_apim/apigee_apis.py,sha256=nVarxYSD1TIjCduBQyW8LIODyPk76xpELXD2lhyWLHc,57427
3
3
  pytest_nhsd_apim/apigee_edge.py,sha256=sIITiwkyKoNVDJ9OmnxV3mipF6LJR0w2qpmvT5Mwr1M,18777
4
4
  pytest_nhsd_apim/auth_journey.py,sha256=UovbLXhokUnikrMOaXIhjV8t5aRrcxinAbS96nfZWcY,5154
5
5
  pytest_nhsd_apim/config.py,sha256=ScKfV8iURqDXX2ajgGsRDcVn9RZy2DxLoEU2QQt9lmA,4246
@@ -7,10 +7,10 @@ pytest_nhsd_apim/identity_service.py,sha256=HrXfSm0dIFg51LBng_nf2iIGlOcwzV_J1vA4
7
7
  pytest_nhsd_apim/log.py,sha256=8gYHqzlQM546FB2XvFmLTk1YfZRNeNhIwLmOy0GScr8,2685
8
8
  pytest_nhsd_apim/nhsd_apim_authorization.py,sha256=TE_6YnoM7kpRReiZP6-Z52rRs9bUuax1mpXqkbzg8zQ,3505
9
9
  pytest_nhsd_apim/pytest_nhsd_apim.py,sha256=_snJGTUVsHA70FGrKNNXjx9yNc_UjO1Ffhw0SLQtYUs,5214
10
- pytest_nhsd_apim/secrets.py,sha256=ZoTMRQGElAq4NNOx6FelINKo_YVNBWdgDY8x3bs_Zr0,2272
10
+ pytest_nhsd_apim/secrets.py,sha256=yIYwOZwpliIomtqSJGIYRbAE2HYvLvQU4W2kOa9TnXo,2354
11
11
  pytest_nhsd_apim/token_cache.py,sha256=6L08taTlSyRsx2NCb0LSGsHdWx_wmqwlFtcF7pZMhUg,3540
12
- pytest_nhsd_apim-3.3.13.dist-info/METADATA,sha256=YNdJ5lc-XnXUcccctRhGrf8_I4jcDH_q9w3mOB_-RqY,4518
13
- pytest_nhsd_apim-3.3.13.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
14
- pytest_nhsd_apim-3.3.13.dist-info/entry_points.txt,sha256=XWicT3meTpqLXnZcXNoAd2IfXspFPlNgMgLBMy4nqwQ,57
15
- pytest_nhsd_apim-3.3.13.dist-info/top_level.txt,sha256=ZK5GZP-g_K8gNfm4a58T9JCRb0i1X267ngvNelCGgfQ,17
16
- pytest_nhsd_apim-3.3.13.dist-info/RECORD,,
12
+ pytest_nhsd_apim-3.3.15.dist-info/METADATA,sha256=y8LIwibo_Ulh9ouBI3RFahR7U7k1xIHnd9h7v_DvDI8,4518
13
+ pytest_nhsd_apim-3.3.15.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
14
+ pytest_nhsd_apim-3.3.15.dist-info/entry_points.txt,sha256=XWicT3meTpqLXnZcXNoAd2IfXspFPlNgMgLBMy4nqwQ,57
15
+ pytest_nhsd_apim-3.3.15.dist-info/top_level.txt,sha256=ZK5GZP-g_K8gNfm4a58T9JCRb0i1X267ngvNelCGgfQ,17
16
+ pytest_nhsd_apim-3.3.15.dist-info/RECORD,,