

def test_raises_option_value_error(self):
    from architect.exceptions import OptionValueError
    url = RangeDateDay.architect.partition.options['db']
    RangeDateDay.architect.partition.options['db'] = 'foo'
    with self.assertRaises(OptionValueError):
        self.session.add(RangeDateDay(name='foo', created=datetime.datetime(2014, 4, 15, 18, 44, 23)))
        self.session.commit()
    self.session.rollback()
    RangeDateDay.architect.partition.options['db'] = url

dataset/ETHPy150Open maxtepkeev/architect/tests/test_sqlalchemy.py BaseSqlAlchemyPartitionTestCase.test_raises_option_value_error/original