'Test that a superuser can use the API'

def test_make_build(self):

    client = APIClient()
    client.login(username='super', password='test')
    resp = client.post('/api/v2/build/', {'project': 1, 'version': 1, 'success': True, 'output': 'Test    Output', 'error': 'Test    Error', 'state': 'cloning'}, format='json')
    self.assertEqual(resp.status_code, status.HTTP_201_CREATED)
    build = resp.data
    self.assertEqual(build['state_display'], 'Cloning')
    resp = client.get(('/api/v2/build/%s/' % build['id']))
    self.assertEqual(resp.status_code, 200)
    build = resp.data
    self.assertEqual(build['output'], 'Test    Output')
    self.assertEqual(build['state_display'], 'Cloning')
