Commit 5e9bc6bd authored by Jeremy Kerr's avatar Jeremy Kerr
Browse files

tests: test creating bundles with existing names


Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent 0228487c
......@@ -194,6 +194,20 @@ class BundleCreateFromPatchTest(BundleTestBase):
self.failUnlessEqual(bundle.patches.count(), 1)
self.failUnlessEqual(bundle.patches.all()[0], patch)
def testCreateWithExistingName(self):
newbundlename = self.bundle.name
patch = self.patches[0]
params = {'name': newbundlename,
'action': 'createbundle'}
response = self.client.post('/patch/%d/' % patch.id, params)
self.assertContains(response,
'A bundle called %s already exists' % newbundlename)
count = Bundle.objects.count()
self.failUnlessEqual(Bundle.objects.count(), 1)
class BundleAddFromListTest(BundleTestBase):
def testAddToEmptyBundle(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment