diff --git a/tests/tests_rest_assets.py b/tests/tests_rest_assets.py index 4c94ad072..feb8b4ea7 100644 --- a/tests/tests_rest_assets.py +++ b/tests/tests_rest_assets.py @@ -96,6 +96,12 @@ def test_update_asset_should_return_correct_asset_uuid(self): {'asset_type_id': 1, 'asset_name': 'new_asset_name'}).json() self.assertEqual(asset_uuid, response['asset_uuid']) + def test_update_asset_should_return_404_when_asset_not_found(self): + case_identifier = self._subject.create_dummy_case() + response = self._subject.update(f'/api/v2/cases/{case_identifier}/assets/{_IDENTIFIER_FOR_NONEXISTENT_OBJECT}', + {'asset_type_id': 1, 'asset_name': 'new_asset_name'}) + self.assertEqual(404, response.status_code) + def test_delete_asset_should_return_204(self): case_identifier = self._subject.create_dummy_case() body = {'asset_type_id': 1, 'asset_name': 'admin_laptop_test'}