Skip to content

Commit

Permalink
SA14/Tests: Do not pass params=None to crate_before_execute
Browse files Browse the repository at this point in the history
Specifically, for the non-bulk case. In case of validating bulk updates,
it is still left to `None`.

Croaks otherwise::

      File "/Users/amo/dev/crate/sources/crate-python/src/crate/client/sqlalchemy/tests/compiler_test.py", line 58, in test_crate_update_rewritten
        assert hasattr(clauseelement, '_crate_specific') is True
    AssertionError
  • Loading branch information
amotl committed Jun 1, 2022
1 parent a5388ab commit bd5a806
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crate/client/sqlalchemy/tests/compiler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ def setUp(self):

def test_sqlite_update_not_rewritten(self):
clauseelement, multiparams, params = crate_before_execute(
self.sqlite_engine, self.update, self.values, None
self.sqlite_engine, self.update, self.values, {}
)

assert hasattr(clauseelement, '_crate_specific') is False

def test_crate_update_rewritten(self):
clauseelement, multiparams, params = crate_before_execute(
self.crate_engine, self.update, self.values, None
self.crate_engine, self.update, self.values, {}
)

assert hasattr(clauseelement, '_crate_specific') is True
Expand Down

0 comments on commit bd5a806

Please sign in to comment.