Skip to content

Commit 5e19241

Browse files
committed
Fix TypeError in test_db.py, which did't expect alembic.ini param
... config = pretend.stub( registry=pretend.stub(settings={"database.url": pretend.stub()}) ) > alembic_config = _configure_alembic(config) tests/unit/test_db.py:97: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <stub(registry=<stub(settings={'database.url': <stub()>})>)> def _configure_alembic(config): > alembic_cfg = alembic.config.Config("warehouse/migrations/alembic.ini") E TypeError: config_cls() takes 0 positional arguments but 1 was given
1 parent ce23441 commit 5e19241

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/unit/test_db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def handler(config):
8585
def test_configure_alembic(monkeypatch):
8686
config_obj = pretend.stub(set_main_option=pretend.call_recorder(lambda *a: None))
8787

88-
def config_cls():
88+
def config_cls(file_=None):
8989
return config_obj
9090

9191
monkeypatch.setattr(alembic.config, "Config", config_cls)

0 commit comments

Comments
 (0)