def test_monitor_collection_calls_two_monitors(mock_store): mock_store.return_value = None monitor_collection = MonitorComposite(MockMonitor(), MockMonitor()) state = {'air_temperature': 273.15} monitor_collection.store(state) assert mock_store.called assert mock_store.call_count == 2
def test_empty_monitor_collection(): # mainly we're testing that nothing errors monitor_collection = MonitorComposite() state = {'air_temperature': 273.15} monitor_collection.store(state)