Skip to content

Commit

Permalink
be explicit in the errors expected from an integrity error
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Mar 16, 2012
1 parent 2aedb69 commit b888393
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion master/buildbot/test/unit/test_db_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#
# Copyright Buildbot Team Members

import sqlalchemy as sa
from twisted.trial import unittest
from buildbot.db import users
from buildbot.test.util import connector_component
Expand Down Expand Up @@ -193,7 +194,8 @@ def test_addUser_existing_identifier(self):
identifier='soap',
attr_type='telepathIO(tm)',
attr_data='hmm,lye'))
return self.assertFailure(d, Exception) # exception varies with dialect
return self.assertFailure(d, sa.exc.IntegrityError,
sa.exc.ProgrammingError)

def test_getUser(self):
d = self.insertTestData(self.user1_rows)
Expand Down

0 comments on commit b888393

Please sign in to comment.