Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
henilp105 committed Mar 24, 2024
1 parent 77562bc commit 6382512
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/tests/test_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def login(self,is_sudo=False):
response_for_signup = self.client.post("/auth/signup", data=signup_data)
self.assertEqual(200, response_for_signup.json["code"])
self.is_created = True
login_data = {"user_identifier": self.email, "password": self.password}
login_data = {"user_identifier": self.email, "password": self.password if not is_sudo else os.getenv("SUDO_PASSWORD")}

# Login with the same user.
response_for_login = self.client.post("/auth/login", data=login_data)
Expand Down Expand Up @@ -545,7 +545,6 @@ def test_successful_fetch_malicious_reports(self):

access_token = self.login(is_sudo=True) # create a sudo user
response = self.client.get("/report/view",headers={"Authorization": f"Bearer {access_token}"})
print(response.json)
self.assertEqual(200, response.json["code"])
print("test_successful_fetch_malicious_reports passed")

Expand Down

0 comments on commit 6382512

Please sign in to comment.