def test_create_drop_tables_single_meta(self):
        Base = declarative_base()

        class A(Base):
            __tablename__ = 'A'
            id = Column(Integer, primary_key=True)

        engine = create_engine('sqlite://')
        cli = Sqla(orm.sessionmaker(bind=engine), metadata=Base.metadata)

        for verbose in [False, True]:

            cli.command_create_tables(verbose=verbose)
            self.assertTrue(engine.has_table('A'))
            with mock.patch.object(sys.stdin, 'readline', return_value='n'):
                try:
                    cli.command_drop_tables()
                except __HOLE__:
                    pass
            self.assertTrue(engine.has_table('A'))

            with mock.patch.object(sys.stdin, 'readline', return_value='y'):
                cli.command_drop_tables()
            self.assertFalse(engine.has_table('A'))
dataset/ETHPy150Open SmartTeleMax/iktomi/tests/cli/sqla.py/SqlaTests.test_create_drop_tables_single_meta