Skip to content

Should be able to instantiate Query without a connection #390

Open
@maxalbert

Description

@maxalbert

Currently the code in Query.__init__() raises an error if no valid connection to flowdb exists.

This has various disadvantages. For example, it makes it necessary to create connections in all tests that use a flowmachine query, even if they don't require running it. A more subtle downside is that it encourages to write tests in a more integrationy style (typically running against the database and checking the result, which slows down the test suite) rather than encouraging a design which allows for more unit-style tests.

It would be beneficial if Query objects could be instantiated without requiring an active connection to flowdb (e.g. by passing a dummy connection).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions