diff --git a/Backend/main.py b/Backend/main.py index 5ed46ed..dcc2f6c 100644 --- a/Backend/main.py +++ b/Backend/main.py @@ -6,7 +6,8 @@ app = Flask(__name__) -user_acc_info = {"Name": "Eric", "Location": "Connecticut", "Occupation": "Student"} # Example user information +# Example user information +user_acc_info = {"Name": "Eric", "Location": "Connecticut", "Occupation": "Student"} @app.route("/get_random_pet", methods=["GET"]) def get_random_pet_endpoint(): @@ -32,4 +33,4 @@ def replace_user_information(): return jsonify(replace_user_location(new_location)), 200 if __name__ == "__main__": - app.run(host="0.0.0.0", port=5000, debug=True) \ No newline at end of file + app.run(host="0.0.0.0", port=5000, debug=True) diff --git a/Backend/test_main.py b/Backend/test_main.py index 8cffc9d..704c606 100644 --- a/Backend/test_main.py +++ b/Backend/test_main.py @@ -37,5 +37,8 @@ def test_remove_user_favorite(): def test_change_user_location(): """Test for http://localhost:5000/change_user_location.""" url = "http://localhost:5000" - response = requests.put(f"{url}/change_user_location", json={"Location": "New York"}, timeout=10) - assert response.json() == {"Location": "New York", "Name": "Eric", "Occupation": "Student", "Password": "2020"} \ No newline at end of file + response = requests.put(f"{url}/change_user_location", json={"Location": "New York"}, + timeout=10) + assert response.json() == {"Location": "New York", "Name": "Eric", "Occupation": + "Student", "Password": "2020"} + \ No newline at end of file diff --git a/Backend/user_func.py b/Backend/user_func.py index bb4cf17..51ff4ad 100644 --- a/Backend/user_func.py +++ b/Backend/user_func.py @@ -1,4 +1,5 @@ -""" This module handles user-related functionalities such as managing favorites and updating user information. """ +""" This module handles user-related functionalities such as +managing favorites and updating user information. """ user_favorite_database = [] # Simulate a database for user favorites user_acc_info = { @@ -22,4 +23,4 @@ def replace_user_location(new_location): """Change the user account location.""" new_location = new_location.get("Location") user_acc_info["Location"] = new_location # Set new location associated with the user - return user_acc_info # Return updated user account information \ No newline at end of file + return user_acc_info # Return updated user account information