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

Improve code coverage and fix test #7

Open
Agent-Hellboy opened this issue May 20, 2023 · 3 comments
Open

Improve code coverage and fix test #7

Agent-Hellboy opened this issue May 20, 2023 · 3 comments

Comments

@Agent-Hellboy
Copy link
Owner

Agent-Hellboy commented May 20, 2023

the error we are getting

        if name in app.blueprints:
            bp_desc = "this" if app.blueprints[name] is self else "a different"
            existing_at = f" '{name}'" if self_name != name else ""
    
>           raise ValueError(
                f"The name '{self_name}' is already registered for"
                f" {bp_desc} blueprint{existing_at}. Use 'name=' to"
                f" provide a unique name."
            )
E           ValueError: The name 'user' is already registered for a different blueprint. Use 'name=' to provide a unique name.

/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/flask/blueprints.py:310: ValueError
=========================== short test summary info ============================
ERROR tests/test_views.py::test_registration - ValueError: The name 'user' is already registered for a different blueprint. Use 'name=' to provide a unique name.
========================== 1 passed, 1 error in 0.27s ==========================

we should know how the flask test client deals with request and application context and why it is trying to register a registered blueprint.

@Agent-Hellboy Agent-Hellboy changed the title Improve code covergae Improve code coverage and fix test May 24, 2023
@newtoallofthis123
Copy link

I'll try doing this

@parth-verma7
Copy link

@Agent-Hellboy I would like to work upon this issue. Can you please assign it to me.

@Agent-Hellboy
Copy link
Owner Author

Agent-Hellboy commented Sep 27, 2023

sure, go ahead and raise a PR, both of you can work on the same issue, whoever raises the PR first other one has to review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants