def test_get_priority(): artifact = MockedConnectedArtifactFactory(priority=10) future = artifact.start(auto_register=False) future.result() artifact.mock_presence() assert artifact.presence.priority == 10
def test_get_status_dict(): artifact = MockedConnectedArtifactFactory(status={"en": "Working"}) future = artifact.start(auto_register=False) future.result() artifact.mock_presence() assert artifact.presence.status == {"en": "Working"}
def test_get_state_show(): artifact = MockedConnectedArtifactFactory(available=True, show=PresenceShow.AWAY) future = artifact.start(auto_register=False) future.result() artifact.mock_presence() assert artifact.presence.state.show == PresenceShow.AWAY
def test_set_available(): artifact = MockedConnectedArtifactFactory() future = artifact.start(auto_register=False) future.result() artifact.mock_presence() artifact.presence.set_available() assert artifact.presence.is_available()
def test_set_available_with_show(): artifact = MockedConnectedArtifactFactory() future = artifact.start(auto_register=False) future.result() artifact.mock_presence() artifact.presence.set_available(show=PresenceShow.CHAT) assert artifact.presence.is_available() assert artifact.presence.state.show == PresenceShow.CHAT