-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: Improve setup of fake cursor within
DialectTest
test cases
The test cases use a shared instance of a fake cursor, which is needed to satisfy CrateDB version inquiry of the driver early on, so it needs to be established _before_ invoking `sa.create_engine()` / `engine.connect()`. On the other hand, the _individual_ configuration of the fake cursor should happen per test case, to be able to define different values for `cursor.return_value` _and_ `cursor.description`. Beforehand, the corresponding test cases only succeeded because all used the same structure of a database response, i.e. all queried only a _single_ data column. Now, response structures are defined individually by setting `cursor.description` within the body of each test case.
- Loading branch information
Showing
1 changed file
with
52 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters