diff options
| author | Barry Warsaw | 2014-10-02 00:15:36 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2014-10-02 00:15:36 -0400 |
| commit | 8ac1f1e9010bb1a3c4b1a0890824b9efa3ab737b (patch) | |
| tree | ce398696fd605d3f0038d2a1ae5bedead65e4145 | |
| parent | 2fcc921b2cca02976a7b1ca8da4f15d55595974e (diff) | |
| download | mailman-8ac1f1e9010bb1a3c4b1a0890824b9efa3ab737b.tar.gz mailman-8ac1f1e9010bb1a3c4b1a0890824b9efa3ab737b.tar.zst mailman-8ac1f1e9010bb1a3c4b1a0890824b9efa3ab737b.zip | |
Fix the test suite.
* Fix a couple of typos.
* Make the script_location and alembic_scripts a resource paths.
| -rw-r--r-- | src/mailman/commands/cli_migrate.py | 2 | ||||
| -rw-r--r-- | src/mailman/config/alembic.cfg (renamed from src/mailman/config/alembic.ini) | 2 | ||||
| -rw-r--r-- | src/mailman/config/schema.cfg | 2 | ||||
| -rw-r--r-- | src/mailman/database/base.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/mailman/commands/cli_migrate.py b/src/mailman/commands/cli_migrate.py index 8783b5c46..ca9d5e9d4 100644 --- a/src/mailman/commands/cli_migrate.py +++ b/src/mailman/commands/cli_migrate.py @@ -48,7 +48,7 @@ class Migrate: '-a', '--autogenerate', action='store_true', help=_("""\ Autogenerate the migration script using Alembic.""")) - command.parser_add_argument( + command_parser.add_argument( '-q', '--quiet', action='store_true', default=False, help=('Produce less output.')) diff --git a/src/mailman/config/alembic.ini b/src/mailman/config/alembic.cfg index a7247743c..46ac90b61 100644 --- a/src/mailman/config/alembic.ini +++ b/src/mailman/config/alembic.cfg @@ -2,7 +2,7 @@ [alembic] # path to migration scripts -script_location = src/mailman/database/alembic +script_location = mailman.database:alembic # template used to generate migration files # file_template = %%(rev)s_%%(slug)s diff --git a/src/mailman/config/schema.cfg b/src/mailman/config/schema.cfg index f66c0b5b5..e8f89ab41 100644 --- a/src/mailman/config/schema.cfg +++ b/src/mailman/config/schema.cfg @@ -206,7 +206,7 @@ debug: no # Where can we find the Alembic migration scripts? The `python:` schema means # that this is a module path relative to the Mailman 3 source installation. -alembic_scripts: python:mailman.database.alembic +alembic_scripts: mailman.database:alembic [logging.template] diff --git a/src/mailman/database/base.py b/src/mailman/database/base.py index e49d512c0..4c418c289 100644 --- a/src/mailman/database/base.py +++ b/src/mailman/database/base.py @@ -100,7 +100,7 @@ class SABaseDatabase: # alembic_version table. alembic_cfg = Config() alembic_cfg.set_main_option( - 'script_location', expand_path(config.database['alembic_scripts'])) + 'script_location', config.database['alembic_scripts']) command.stamp(alembic_cfg, 'head') |
