pytest-nhsd-apim 3.4.4__tar.gz → 3.4.5__tar.gz

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.

Files changed (25) hide show
  1. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/PKG-INFO +4 -5
  2. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/pyproject.toml +5 -5
  3. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim/apigee_apis.py +28 -22
  4. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim.egg-info/PKG-INFO +4 -5
  5. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim.egg-info/requires.txt +3 -4
  6. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/README.md +0 -0
  7. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/setup.cfg +0 -0
  8. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/setup.py +0 -0
  9. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim/__init__.py +0 -0
  10. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim/apigee_edge.py +0 -0
  11. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim/auth_journey.py +0 -0
  12. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim/config.py +0 -0
  13. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim/identity_service.py +0 -0
  14. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim/log.py +0 -0
  15. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim/nhsd_apim_authorization.py +0 -0
  16. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim/pytest_nhsd_apim.py +0 -0
  17. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim/secrets.py +0 -0
  18. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim/token_cache.py +0 -0
  19. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim.egg-info/SOURCES.txt +0 -0
  20. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim.egg-info/dependency_links.txt +0 -0
  21. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim.egg-info/entry_points.txt +0 -0
  22. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/src/pytest_nhsd_apim.egg-info/top_level.txt +0 -0
  23. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/tests/test_apigee_apis.py +0 -0
  24. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/tests/test_examples.py +0 -0
  25. {pytest_nhsd_apim-3.4.4 → pytest_nhsd_apim-3.4.5}/tests/test_nhsd_apim.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytest-nhsd-apim
3
- Version: 3.4.4
3
+ Version: 3.4.5
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
@@ -16,14 +16,13 @@ Requires-Dist: cryptography==42.0.0
16
16
  Requires-Dist: lxml==4.9.1
17
17
  Requires-Dist: pycryptodome==3.20.0
18
18
  Requires-Dist: PyJWT==2.8.0
19
- Requires-Dist: pyotp==2.9.0
19
+ Requires-Dist: pyotp==2.6.0
20
20
  Requires-Dist: pytest==8.2.0
21
21
  Requires-Dist: requests==2.31.0
22
22
  Requires-Dist: toml==0.10.2
23
- Requires-Dist: typing-extensions==4.11.0
24
- Requires-Dist: pydantic==2.9.2
23
+ Requires-Dist: typing-extensions==4.3.0
24
+ Requires-Dist: pydantic==1.9.1
25
25
  Requires-Dist: wheel<0.39.0,===0.37.1
26
- Requires-Dist: pydantic-settings==2.2.1
27
26
 
28
27
  # pytest-nhsd-apim
29
28
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pytest-nhsd-apim"
3
- version = "3.4.4"
3
+ version = "3.4.5"
4
4
  description = "Pytest plugin accessing NHSDigital's APIM proxies"
5
5
  authors = ["Adrian Ciobanita <adrian.ciobanita1@nhs.net>", "Alex Carrie <alexander.carrie1@nhs.net>", "Lucas Fantini <lucas.fantini@nhs.net>"]
6
6
  maintainers = ["Alex Carrie <alexander.carrie1@nhs.net>", "Alex Hawdon <alex.hawdon1@nhs.net"]
@@ -16,14 +16,14 @@ lxml = "^4.9.1"
16
16
  python = "^3.8"
17
17
  pycryptodome = "^3.20.0"
18
18
  PyJWT = "^2.8.0"
19
- pyotp = "^2.9.0"
19
+ pyotp = "^2.6.0"
20
20
  pytest = "^8.2.0"
21
21
  requests = "^2.31.0"
22
22
  toml = "^0.10.2"
23
- typing-extensions = "^4.11.0"
24
- pydantic = "^2.9.2"
23
+ typing-extensions = "^4.3.0"
24
+ pydantic = "^1.9.1"
25
25
  wheel = ">=0.37.1,<0.39.0"
26
- pydantic-settings = "^2.2.1"
26
+
27
27
 
28
28
  [tool.poetry.dev-dependencies]
29
29
 
@@ -5,8 +5,7 @@ import jwt
5
5
  import pyotp
6
6
  import requests
7
7
  from jwt import ExpiredSignatureError
8
- from pydantic import model_validator
9
- from pydantic_settings import BaseSettings
8
+ from pydantic import BaseSettings, root_validator
10
9
 
11
10
 
12
11
  class ApigeeProdCredentials(BaseSettings):
@@ -39,27 +38,29 @@ class ApigeeProdCredentials(BaseSettings):
39
38
  apigee_nhsd_prod_password: Optional[str] = None
40
39
  apigee_nhsd_prod_passcode: Optional[str] = None
41
40
  apigee_access_token: Optional[str] = None
42
- auth_method: Optional[str] = None
43
41
 
44
- @model_validator(mode="before")
42
+ @root_validator
45
43
  def check_credentials_config(cls, values):
46
44
  print(values)
47
45
  """Checks for the right set of credentials"""
48
46
  if all(
49
47
  [
50
- values.get("apigee_nhsd_prod_username"),
51
- values.get("apigee_nhsd_prod_password"),
52
- values.get("auth_server"),
48
+ values.get(key)
49
+ for key in [
50
+ "apigee_nhsd_prod_username",
51
+ "apigee_nhsd_prod_password",
52
+ "auth_server",
53
+ ]
53
54
  ]
54
55
  ):
55
56
  values["auth_method"] = "saml"
56
57
  return values
57
58
  elif all(
58
- [values.get("auth_server"), values.get("apigee_nhsd_prod_passcode")]
59
+ [values.get(key) for key in ["auth_server", "apigee_nhsd_prod_passcode"]]
59
60
  ):
60
61
  values["auth_method"] = "saml"
61
62
  return values
62
- elif values.get("apigee_access_token"):
63
+ elif values["apigee_access_token"]:
63
64
  values["auth_method"] = "access_token"
64
65
  return values
65
66
  else:
@@ -100,34 +101,39 @@ class ApigeeProdCredentials(BaseSettings):
100
101
 
101
102
  class ApigeeNonProdCredentials(BaseSettings):
102
103
  auth_server: str = "login.apigee.com"
103
- apigee_nhsd_nonprod_username: Optional[str] = None
104
- apigee_nhsd_nonprod_password: Optional[str] = None
105
- apigee_nhsd_nonprod_otp_key: Optional[str] = None
106
- apigee_access_token: Optional[str] = None
107
- auth_method: Optional[str] = None
104
+ apigee_nhsd_nonprod_username: Optional[str]
105
+ apigee_nhsd_nonprod_password: Optional[str]
106
+ apigee_nhsd_nonprod_otp_key: Optional[str]
107
+ apigee_access_token: Optional[str]
108
108
 
109
- @model_validator(mode='before')
109
+ @root_validator
110
110
  def check_credentials_config(cls, values):
111
111
  """Checks for the right set of credentials"""
112
112
  if all(
113
113
  [
114
- values.get("apigee_nhsd_nonprod_username"),
115
- values.get("apigee_nhsd_nonprod_password"),
116
- values.get("apigee_nhsd_nonprod_otp_key"),
114
+ values.get(key)
115
+ for key in [
116
+ "apigee_nhsd_nonprod_username",
117
+ "apigee_nhsd_nonprod_password",
118
+ "apigee_nhsd_nonprod_otp_key",
119
+ ]
117
120
  ]
118
121
  ):
119
122
  values["auth_method"] = "saml"
120
123
  return values
121
124
  elif all(
122
125
  [
123
- values.get("auth_server"),
124
- values.get("apigee_nhsd_nonprod_password"),
125
- values.get("apigee_nhsd_nonprod_username"),
126
+ values.get(key)
127
+ for key in [
128
+ "auth_server",
129
+ "apigee_nhsd_nonprod_password",
130
+ "apigee_nhsd_nonprod_username",
131
+ ]
126
132
  ]
127
133
  ):
128
134
  values["auth_method"] = "saml"
129
135
  return values
130
- elif values.get("apigee_access_token"):
136
+ elif values["apigee_access_token"]:
131
137
  values["auth_method"] = "access_token"
132
138
  return values
133
139
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytest-nhsd-apim
3
- Version: 3.4.4
3
+ Version: 3.4.5
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
@@ -16,14 +16,13 @@ Requires-Dist: cryptography==42.0.0
16
16
  Requires-Dist: lxml==4.9.1
17
17
  Requires-Dist: pycryptodome==3.20.0
18
18
  Requires-Dist: PyJWT==2.8.0
19
- Requires-Dist: pyotp==2.9.0
19
+ Requires-Dist: pyotp==2.6.0
20
20
  Requires-Dist: pytest==8.2.0
21
21
  Requires-Dist: requests==2.31.0
22
22
  Requires-Dist: toml==0.10.2
23
- Requires-Dist: typing-extensions==4.11.0
24
- Requires-Dist: pydantic==2.9.2
23
+ Requires-Dist: typing-extensions==4.3.0
24
+ Requires-Dist: pydantic==1.9.1
25
25
  Requires-Dist: wheel<0.39.0,===0.37.1
26
- Requires-Dist: pydantic-settings==2.2.1
27
26
 
28
27
  # pytest-nhsd-apim
29
28
 
@@ -3,11 +3,10 @@ cryptography==42.0.0
3
3
  lxml==4.9.1
4
4
  pycryptodome==3.20.0
5
5
  PyJWT==2.8.0
6
- pyotp==2.9.0
6
+ pyotp==2.6.0
7
7
  pytest==8.2.0
8
8
  requests==2.31.0
9
9
  toml==0.10.2
10
- typing-extensions==4.11.0
11
- pydantic==2.9.2
10
+ typing-extensions==4.3.0
11
+ pydantic==1.9.1
12
12
  wheel<0.39.0,===0.37.1
13
- pydantic-settings==2.2.1