'Ensure anonymous/non-staff users cannot update build endpoints'

def test_update_build_without_permission(self):

    client = APIClient()
    api_user = get(User, staff=False, password='test')
    client.force_authenticate(user=api_user)
    build = get(Build, project_id=1, version_id=1, state='cloning')
    resp = client.put('/api/v2/build/{0}/'.format(build.pk), {'project': 1, 'version': 1, 'state': 'finished'}, format='json')
    self.assertEqual(resp.status_code, 403)
