Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/28 local base urls #29

Merged
merged 6 commits into from
Apr 5, 2024
Merged

Feature/28 local base urls #29

merged 6 commits into from
Apr 5, 2024

Conversation

annashamray
Copy link
Contributor

fixes #28

@@ -7,6 +9,21 @@
from rest_framework.request import Request


def is_local(host: str, url: str) -> bool:
Copy link
Member

Choose a reason for hiding this comment

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

Could we have a few unittests for only this method? I'm all in favor of integration tests but this feels complicated enough to test separately as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tests are added

Copy link
Member

@alextreme alextreme left a comment

Choose a reason for hiding this comment

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

Request for additional tests, but imho this isn't mandatory. A double-check from Steven is though

Copy link
Contributor

@stevenbal stevenbal left a comment

Choose a reason for hiding this comment

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

Just a question regarding validate_host, other than that it looks good. I would also like to see the unittests that Alex mentioned, but this could maybe be added in a separate PR if we want to get this released quickly

django_loose_fk/loaders.py Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.80%. Comparing base (84facdb) to head (11e73b0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
+ Coverage   99.78%   99.80%   +0.01%     
==========================================
  Files          14       15       +1     
  Lines         476      516      +40     
==========================================
+ Hits          475      515      +40     
  Misses          1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@annashamray annashamray force-pushed the feature/28-local-base-urls branch from 828fff0 to 11e73b0 Compare April 5, 2024 09:37
@annashamray annashamray merged commit 7d04010 into main Apr 5, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add explicit setting to determine if url is local
4 participants