def test_args_propagate(self): config = _no_sql_testing_config() script = ScriptDirectory.from_config(config) template_args = {"x": "x1", "y": "y1", "z": "z1"} env = EnvironmentContext(config, script, template_args=template_args) env.configure(dialect_name="sqlite", template_args={"y": "y2", "q": "q1"}) eq_(template_args, {"x": "x1", "y": "y2", "z": "z1", "q": "q1"})
def setUp(self): env = staging_env() self.cfg = cfg = _no_sql_testing_config() self.rid = rid = util.rev_id() self.script = script = ScriptDirectory.from_config(cfg) script.generate_revision(rid, None, refresh=True)
def setup(): global cfg, env env = staging_env() cfg = _no_sql_testing_config() cfg.set_main_option('dialect_name', 'sqlite') cfg.remove_main_option('url') global a, b, c a, b, c = three_rev_fixture(cfg)
def test_args_propagate(self): config = _no_sql_testing_config() script = ScriptDirectory.from_config(config) template_args = {"x": "x1", "y": "y1", "z": "z1"} env = EnvironmentContext(config, script, template_args=template_args) env.configure(dialect_name="sqlite", template_args={ "y": "y2", "q": "q1" }) eq_(template_args, {"x": "x1", "y": "y2", "z": "z1", "q": "q1"})
def setUp(self): global cfg, env, a env = staging_env() cfg = _no_sql_testing_config() cfg.set_main_option('dialect_name', 'sqlite') cfg.remove_main_option('url') a = util.rev_id() script = ScriptDirectory.from_config(cfg) script.generate_revision(a, "revision a", refresh=True) write_script(script, a, """# coding: utf-8 from __future__ import unicode_literals revision = '%s' down_revision = None from alembic import op def upgrade(): op.execute("« S’il vous plaît…") def downgrade(): op.execute("drôle de petite voix m’a réveillé") """.encode('utf-8') % a)
def setUp(self): env = staging_env() self.cfg = _no_sql_testing_config() global a, b, c a, b, c = three_rev_fixture(self.cfg)
def setup_class(cls): env = staging_env() cls.cfg = cfg = _no_sql_testing_config("mssql") cls.a, cls.b, cls.c = \ three_rev_fixture(cfg)
def setUp(self): staging_env() self.cfg = _no_sql_testing_config( directives="\nrevision_environment=true\n" )
def setUp(self): staging_env() self.cfg = _no_sql_testing_config( directives="\nrevision_environment=true\n")
def setup_class(cls): env = staging_env() cls.cfg = cfg = _no_sql_testing_config("oracle") cls.a, cls.b, cls.c = \ three_rev_fixture(cfg)