diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-09-09 12:24:43 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-09-09 12:24:43 -0400 |
commit | 10d3556a5501563a4110733ecc9d9ba8eb172a99 (patch) | |
tree | 0646aa84d3f89c2f9cf59ba298e06d5c1f312ee1 /tests/test_mssql.py | |
parent | effe3d89238923c5913449879adb1c685eb17c60 (diff) | |
download | alembic-10d3556a5501563a4110733ecc9d9ba8eb172a99.tar.gz |
- do an autopep8 pass for just about everything other
than line length
Diffstat (limited to 'tests/test_mssql.py')
-rw-r--r-- | tests/test_mssql.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/test_mssql.py b/tests/test_mssql.py index 3205959..396692f 100644 --- a/tests/test_mssql.py +++ b/tests/test_mssql.py @@ -11,6 +11,7 @@ from . import op_fixture, capture_context_buffer, \ class FullEnvironmentTests(TestCase): + @classmethod def setup_class(cls): env = staging_env() @@ -41,13 +42,14 @@ class FullEnvironmentTests(TestCase): command.upgrade(self.cfg, self.a, sql=True) assert "BYE" in buf.getvalue() + class OpTest(TestCase): + def test_add_column(self): context = op_fixture('mssql') op.add_column('t1', Column('c1', Integer, nullable=False)) context.assert_("ALTER TABLE t1 ADD c1 INTEGER NOT NULL") - def test_add_column_with_default(self): context = op_fixture("mssql") op.add_column('t1', Column('c1', Integer, nullable=False, server_default="12")) @@ -78,8 +80,8 @@ class OpTest(TestCase): context = op_fixture('mssql') from sqlalchemy import Boolean op.alter_column('tests', 'col', - existing_type=Boolean(), - nullable=False) + existing_type=Boolean(), + nullable=False) context.assert_('ALTER TABLE tests ALTER COLUMN col BIT NOT NULL') def test_drop_index(self): @@ -95,7 +97,6 @@ class OpTest(TestCase): context.assert_contains("exec('alter table t1 drop constraint ' + @const_name)") context.assert_contains("ALTER TABLE t1 DROP COLUMN c1") - def test_alter_column_drop_default(self): context = op_fixture('mssql') op.alter_column("t", "c", server_default=None) @@ -186,7 +187,7 @@ class OpTest(TestCase): def test_alter_do_everything(self): context = op_fixture('mssql') op.alter_column("t", "c", new_column_name="c2", nullable=True, - type_=Integer, server_default="5") + type_=Integer, server_default="5") context.assert_( 'ALTER TABLE t ALTER COLUMN c INTEGER NULL', "ALTER TABLE t ADD DEFAULT '5' FOR c", @@ -199,7 +200,7 @@ class OpTest(TestCase): context.assert_contains("EXEC sp_rename 't1', t2") # TODO: when we add schema support - #def test_alter_column_rename_mssql_schema(self): + # def test_alter_column_rename_mssql_schema(self): # context = op_fixture('mssql') # op.alter_column("t", "c", name="x", schema="y") # context.assert_( |