def test_create_attribute_with_attribute_error(self):
test_mock = Mock()
class BaseTestClass:
@classmethod
def _get_db(cls):
db = Mock()
db._framework = asyncio_framework
return db
def some_method(self):
test_mock()
class TestClass(BaseTestClass):
some_method = metaprogramming.Async()
test_class = TestClass
with self.assertRaises(AttributeError):
test_class.some_method = TestClass.some_method.create_attribute(
TestClass, 'some_other_method')
评论列表
文章目录