[PATCH] Fix 'order_start' on BundleReorderTest unit test

Eduardo Habkost ehabkost at redhat.com
Fri Aug 14 06:21:23 EST 2009


I've found the cause of the failure I was getting.

The 'order_start' parameter on the reorder form should be a patch ID,
not the 'order' field of BundlePatch.

This fixes the following test failure:

> ======================================================================
> FAIL: testBundleReorder (patchwork.tests.bundles.BundleReorderTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/mnt/common/code/admin/rh-patchwork/apps/patchwork/tests/bundles.py", line 358, in testBundleReorder
>     self.failUnlessEqual(response.status_code, 200)
> AssertionError: 404 != 200
> 
> ----------------------------------------------------------------------
> Ran 123 tests in 4.527s
> 
> FAILED (failures=1)


Signed-off-by: Eduardo Habkost <ehabkost at redhat.com>
---
 apps/patchwork/tests/bundles.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/apps/patchwork/tests/bundles.py b/apps/patchwork/tests/bundles.py
index 4e8fe2b..2e4c8fa 100644
--- a/apps/patchwork/tests/bundles.py
+++ b/apps/patchwork/tests/bundles.py
@@ -349,7 +349,7 @@ class BundleReorderTest(BundleTestBase):
         neworder_ids = [ p.id for p in neworder ]
 
         params = {'form': 'reorderform',
-                  'order_start': bundlepatch.order,
+                  'order_start': bundlepatch.patch.id,
                   'neworder': neworder_ids}
 
         response = self.client.post('/user/bundle/%d/' % self.bundle.id,
-- 
1.6.3.rc4.29.g8146

-- 
Eduardo


More information about the Patchwork mailing list