From 10e2eabb1ce287d89a8e4bebde0ddd187067582a Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 23 Feb 2015 13:47:21 -0500 Subject: [PATCH] Fix test --- test/test_api_usage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_api_usage.py b/test/test_api_usage.py index 791c2139f..071630bd9 100644 --- a/test/test_api_usage.py +++ b/test/test_api_usage.py @@ -1375,7 +1375,8 @@ class TestRepositoryBuildResource(ApiTestCase): self.assertEquals(uuid, json['builds'][0]['id']) # Set queue item to be picked up. - qi = database.QueueItem.get(id=1) + build_ref = database.RepositoryBuild.get(uuid=uuid) + qi = database.QueueItem.get(id=build_ref.queue_id) qi.available = False qi.save()