本文整理汇总了Python中coprs.logic.builds_logic.BuildsLogic.add方法的典型用法代码示例。如果您正苦于以下问题:Python BuildsLogic.add方法的具体用法?Python BuildsLogic.add怎么用?Python BuildsLogic.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类coprs.logic.builds_logic.BuildsLogic
的用法示例。
在下文中一共展示了BuildsLogic.add方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_add_error_on_multiply_src
# 需要导入模块: from coprs.logic.builds_logic import BuildsLogic [as 别名]
# 或者: from coprs.logic.builds_logic.BuildsLogic import add [as 别名]
def test_add_error_on_multiply_src(self, f_users, f_coprs,
f_mock_chroots, f_db):
params = dict(
user=self.u1,
pkgs="blah blah",
copr=self.c1,
repos="repos",
timeout=5000)
with pytest.raises(MalformedArgumentException):
BuildsLogic.add(**params)
示例2: test_add_only_adds_active_chroots
# 需要导入模块: from coprs.logic.builds_logic import BuildsLogic [as 别名]
# 或者: from coprs.logic.builds_logic.BuildsLogic import add [as 别名]
def test_add_only_adds_active_chroots(self, f_users, f_coprs, f_builds,
f_mock_chroots, f_db):
self.mc2.is_active = False
self.db.session.commit()
b = BuildsLogic.add(self.u2, "blah", self.c2)
self.db.session.commit()
assert b.chroots[0].name == self.mc3.name
示例3: test_add_assigns_params_correctly
# 需要导入模块: from coprs.logic.builds_logic import BuildsLogic [as 别名]
# 或者: from coprs.logic.builds_logic.BuildsLogic import add [as 别名]
def test_add_assigns_params_correctly(self, f_users, f_coprs,
f_mock_chroots, f_db):
params = dict(
user=self.u1,
pkgs="blah",
copr=self.c1,
repos="repos",
timeout=5000)
b = BuildsLogic.add(**params)
for k, v in params.items():
assert getattr(b, k) == v
示例4: test_add_raises_if_copr_has_unfinished_actions
# 需要导入模块: from coprs.logic.builds_logic import BuildsLogic [as 别名]
# 或者: from coprs.logic.builds_logic.BuildsLogic import add [as 别名]
def test_add_raises_if_copr_has_unfinished_actions(self, f_users, f_coprs,
f_actions, f_db):
with pytest.raises(ActionInProgressException):
b = BuildsLogic.add(self.u1, "blah", self.c1)
self.db.session.rollback()