def METHOD_NAME(self):
    """Test that ownership is working correctly for StockItem/StockLocation."""
    self.enable_ownership()
    item = StockItem.objects.get(pk=self.test_item_id)
    location = StockLocation.objects.get(pk=self.test_location_id)
    # Check that user is not allowed to change item
    self.assertTrue(item.check_ownership(self.user))        # No owner -> True
    self.assertTrue(location.check_ownership(self.user))    # No owner -> True
    self.assertContains(self.assert_api_change(), 'You do not have permission to perform this action.', status_code=403)
    # Adjust group rules
    group = Group.objects.get(name='my_test_group')
    rule = group.rule_sets.get(name='stock')
    rule.can_change = True
    rule.save()
    # Set owner to group of user
    group_owner = Owner.get_owner(group)
    item.owner = group_owner
    item.save()
    location.owner = group_owner
    location.save()
    # Check that user is allowed to change item
    self.assertTrue(item.check_ownership(self.user))        # Owner is group -> True
    self.assertTrue(location.check_ownership(self.user))    # Owner is group -> True
    self.assertContains(self.assert_api_change(), f'"status":{StockStatus.DAMAGED.value}', status_code=200)
    # Change group
    new_group = Group.objects.create(name='new_group')
    new_group_owner = Owner.get_owner(new_group)
    item.owner = new_group_owner
    item.save()
    location.owner = new_group_owner
    location.save()
    # Check that user is not allowed to change item
    self.assertFalse(item.check_ownership(self.user))       # Owner is not in group -> False
    self.assertFalse(location.check_ownership(self.user))    # Owner is not in group -> False