18 lines
751 B
Python
18 lines
751 B
Python
import src.app_controller as app_controller
|
|
|
|
def test_status_attributes_exist():
|
|
controller = app_controller.AppController()
|
|
assert hasattr(controller, '_ai_status')
|
|
assert hasattr(controller, '_mma_status')
|
|
assert controller._ai_status == 'idle'
|
|
assert controller._mma_status == 'idle'
|
|
|
|
def test_status_properties():
|
|
controller = app_controller.AppController()
|
|
controller.ai_status = 'busy'
|
|
assert controller._ai_status == 'busy'
|
|
assert any(t.get('action') == 'set_ai_status' and t.get('value') == 'busy' for t in controller._pending_gui_tasks)
|
|
controller.mma_status = 'active'
|
|
assert controller._mma_status == 'active'
|
|
assert any(t.get('action') == 'set_mma_status' and t.get('value') == 'active' for t in controller._pending_gui_tasks)
|