def test_connectionbase():
# Temporarily disable ABC checks
with patch.multiple(ConnectionBase, __abstractmethods__=set()):
with pytest.raises(TypeError):
ConnectionBase()
c = ConnectionBase('project')
assert c.project_name == 'project'
assert not c.project_namespace
assert c.project_qualname == 'project'
c = ConnectionBase('ns/project')
assert c.project_name == 'project'
assert c.project_namespace == 'ns'
assert c.project_qualname == 'ns/project'
评论列表
文章目录