Skip to content

Commit

Permalink
Merge pull request #73 from cloud-gov/update-url
Browse files Browse the repository at this point in the history
Update tests to match new uaa
  • Loading branch information
soutenniza authored Dec 11, 2024
2 parents dff2060 + c4aa7b7 commit 7a55e2c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions SATS/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@ def post_to_page(self, page, **kwargs) -> requests.models.Response:

def uaa_pick_idp(self) -> str:
r = self.s.get(self.uaa_url + "/login")
params = {
"returnIDParam": "idp",
"entityID": self.uaa_url[8:],
"idp": self.idp_name,
"isPassive": "true",
}
r = self.s.get(f"{self.uaa_url}/saml/discovery", params=params)
r = self.s.get(f"{self.uaa_url}/saml2/authenticate/{self.idp_name}")
soup = BeautifulSoup(r.text, features="html.parser")
saml_request = soup.find(attrs={"name": "SAMLRequest"}).attrs["value"]
relay_state = soup.find(attrs={"name": "RelayState"}).attrs["value"]
Expand Down Expand Up @@ -107,7 +101,7 @@ def log_in(self, username, password, totp_seed=None) -> typing.Tuple[str, bool]:
handles registering totp if user does not have one currently
returns a tuple of str, bool representing the user's totp_seed, and whether a new totp was registered
"""

r = self.uaa_pick_idp()
soup = BeautifulSoup(r.text, features="html.parser")
form = soup.find("form")
Expand Down

0 comments on commit 7a55e2c

Please sign in to comment.