Skip to content

Commit

Permalink
fix: jwt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
henilp105 committed Jan 23, 2024
1 parent 3a6b338 commit 08d4fa8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import os
import toml
import shutil
import json
from flasgger.utils import swag_from
from urllib.parse import unquote
import math
Expand Down Expand Up @@ -589,7 +590,9 @@ def get_package_from_version(namespace_name, package_name, version):
return jsonify({"message": "Package not found", "code": 404}), 404

else:
package_obj = Package.from_json(package)
return jsonify({"message": f"Package not found {type(json.dumps(package))}", "code": 404,}), 404
package_obj = Package.from_json(json.dumps(package))
return jsonify({"message": f"Package not found {package}", "code": 404,}), 404

# Get the package author from id.
package_author = db.users.find_one({"_id": package_obj.author})
Expand Down
1 change: 1 addition & 0 deletions backend/tests/test_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ def test_get_existing_package_version(self):
response = self.client.get(
f"/packages/{self.test_namespace_data['namespace']}/{self.test_package_data['package_name']}/0.0.1"
)
print(response.json["message"])
self.assertEqual(200, response.json["code"])
print("test_get_existing_package_version passed")

Expand Down

1 comment on commit 08d4fa8

@vercel
Copy link

@vercel vercel bot commented on 08d4fa8 Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks for Deployment have failed

Please sign in to comment.