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

Add support for Sanic 21+ #71

Merged
merged 2 commits into from
Aug 18, 2022
Merged

Add support for Sanic 21+ #71

merged 2 commits into from
Aug 18, 2022

Conversation

relud
Copy link
Member

@relud relud commented Aug 17, 2022

fixes #70

@@ -0,0 +1,7 @@
# these are constrained by the files in tests/constraints/*.txt
Copy link
Member Author

Choose a reason for hiding this comment

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

sanic 20.* needs a separate requirements file to remove the sanic-testing requirement.

@relud
Copy link
Member Author

relud commented Aug 17, 2022

r? @jwhitlock

@codecov-commenter
Copy link

codecov-commenter commented Aug 17, 2022

Codecov Report

Merging #71 (8e68ddf) into main (e316f0c) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
+ Coverage   97.80%   97.81%   +0.01%     
==========================================
  Files          18       18              
  Lines         593      596       +3     
  Branches       97       98       +1     
==========================================
+ Hits          580      583       +3     
  Misses          9        9              
  Partials        4        4              
Impacted Files Coverage Δ
src/dockerflow/sanic/checks.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jwhitlock jwhitlock self-requested a review August 18, 2022 15:43
jwhitlock
jwhitlock previously approved these changes Aug 18, 2022
Copy link
Member

@jwhitlock jwhitlock left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @relud! I've got one ignorable suggestion. Please merge when ready.

tests/sanic/test_sanic.py Outdated Show resolved Hide resolved


@pytest.fixture(scope="function")
def app():
app = Sanic("dockerflow")
app = Sanic(f"dockerflow-{uuid.uuid4().hex}")
Copy link
Member

Choose a reason for hiding this comment

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

nice way to generate unique app IDs for tests!

yield test_client
finally:
s.close()
return SanicTestClient(app)
Copy link
Member

Choose a reason for hiding this comment

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

Love to see code removed! 😍

@relud
Copy link
Member Author

relud commented Aug 18, 2022

@jwhitlock suggestion applied, needs your review again, and I don't know that i'll be able to merge it as I don't have write access to this repo.

Copy link
Member

@jwhitlock jwhitlock left a comment

Choose a reason for hiding this comment

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

Thanks! I've given you Write access, see if you can merge now.

@relud relud merged commit 3d47d63 into mozilla-services:main Aug 18, 2022
@relud relud deleted the sanic-21-22 branch August 18, 2022 17:17
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.

Support Sanic 21 and later
3 participants