def test_reaction_knockout_target(self, model): knockout_target = ReactionKnockoutTarget("ACALD") with model: knockout_target.apply(model) assert model.reactions.ACALD.lower_bound == 0 assert model.reactions.ACALD.upper_bound == 0 assert model.reactions.ACALD.lower_bound == -1000 assert model.reactions.ACALD.upper_bound == 1000
def test_reaction_knockout_target(self, model): knockout_target = ReactionKnockoutTarget("ACALD") with TimeMachine() as tm: knockout_target.apply(model, time_machine=tm) assert model.reactions.ACALD.lower_bound == 0 assert model.reactions.ACALD.upper_bound == 0 assert model.reactions.ACALD.lower_bound == -1000 assert model.reactions.ACALD.upper_bound == 1000
def test_invalid_reaction_knockout_target(self, model): knockout_target = ReactionKnockoutTarget("ACALDXYZ") with pytest.raises(KeyError): knockout_target.apply(model)