Agent-Hellboy / flask-starter

A flask extension which contains a basic app and is configured in your local machine through a command line utility
MIT License
5 stars 3 forks source link

Improve code coverage and fix test #7

Open Agent-Hellboy opened 1 year ago

Agent-Hellboy commented 1 year ago

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.

newtoallofthis123 commented 11 months ago

I'll try doing this

parth-verma7 commented 11 months ago

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

Agent-Hellboy commented 11 months ago

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.