예제 #1
0
 def test_deactivate_active_state(self, state):
     metadata = Metadata()
     metadata.activate(state.context)
     metadata.activate(state)
     assert state in metadata.active_states
     metadata.deactivate(state)
     assert state not in metadata.active_states
예제 #2
0
 def test_deactivate_active_state(self, state):
     metadata = Metadata()
     metadata.activate(state.context)
     metadata.activate(state)
     assert state in metadata.active_states
     metadata.deactivate(state)
     assert state not in metadata.active_states
예제 #3
0
 def test_is_active_inactive_state(self, state):
     metadata = Metadata()
     metadata.activate(state.context)
     assert metadata.is_active(state) is False
예제 #4
0
 def test_activate_inactive_state(self, state):
     metadata = Metadata()
     metadata.activate(state.context)
     metadata.activate(state)
     assert state in metadata.active_states
예제 #5
0
 def test_is_active_inactive_state(self, state):
     metadata = Metadata()
     metadata.activate(state.context)
     assert metadata.is_active(state) is False
예제 #6
0
 def test_activate_inactive_state(self, state):
     metadata = Metadata()
     metadata.activate(state.context)
     metadata.activate(state)
     assert state in metadata.active_states
예제 #7
0
 def test_create_metadata(self):
     Metadata()