Esempio n. 1
0
    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
Esempio n. 2
0
    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
Esempio n. 3
0
    def test_invalid_reaction_knockout_target(self, model):
        knockout_target = ReactionKnockoutTarget("ACALDXYZ")

        with pytest.raises(KeyError):
            knockout_target.apply(model)