| 698 | f.revert() |
| 699 | |
| 700 | def test_getset_state(self): |
| 701 | f = tflow(resp=True) |
| 702 | state = f.get_state() |
| 703 | assert f.get_state() == HTTPFlow.from_state(state).get_state() |
| 704 | |
| 705 | f.response = None |
| 706 | f.error = flow.Error("error") |
| 707 | state = f.get_state() |
| 708 | assert f.get_state() == HTTPFlow.from_state(state).get_state() |
| 709 | |
| 710 | f2 = f.copy() |
| 711 | f2.id = f.id # copy creates a different uuid |
| 712 | assert f.get_state() == f2.get_state() |
| 713 | assert not f == f2 |
| 714 | f2.error = flow.Error("e2") |
| 715 | assert not f == f2 |
| 716 | f2.backup() |
| 717 | f2.intercept() # to change the state |
| 718 | f.set_state(f2.get_state()) |
| 719 | assert f.get_state() == f2.get_state() |
| 720 | |
| 721 | def test_kill(self): |
| 722 | f = tflow() |