'Ensure anonymous/non-staff users cannot write the build endpoint'

def test_make_build_without_permission(self):

    client = APIClient()
    def _try_post():
        resp = client.post('/api/v2/build/', {'project': 1, 'version': 1, 'success': True, 'output': 'Test    Output', 'error': 'Test    Error'}, format='json')
        self.assertEqual(resp.status_code, 403)
    _try_post()
    api_user = get(User, staff=False, password='test')
    assert (api_user.is_staff is False)
    client.force_authenticate(user=api_user)
    _try_post()
