async def test_save_no_app_id(api): """Tests save when there's no app id.""" # Arrange settings = AppSettingsEntity(api, None) # Act/Assert with pytest.raises(ValueError): await settings.save()
async def test_refresh(api): """Tests data is refreshed.""" # Arrange data = {"settings": {"test2": "test"}} settings = AppSettingsEntity(api, APP_ID, data) # Act await settings.refresh() # Assert assert settings.settings == {"test": "test"}
async def test_save(api): """Tests the save function.""" # Arrange data = {"settings": {"test": "test"}} settings = AppSettingsEntity(api, APP_ID, data) # Act await settings.save() # Assert assert settings.settings == {"test": "test"}
async def test_refresh(api): """Tests data is refreshed.""" # Arrange data = {'settings': {'test2': 'test'}} settings = AppSettingsEntity(api, APP_ID, data) # Act await settings.refresh() # Assert assert settings.settings == {'test': 'test'}