Permalink
Browse files

Fix error class

  • Loading branch information...
mattupstate committed Jul 3, 2013
1 parent 88e0794 commit 1a201ab82bcac47815b2a0400c3ddaed0869aaa6
Showing with 10 additions and 2 deletions.
  1. +4 −2 overholt/core.py
  2. +6 −0 tests/api/store_tests.py
View
@@ -22,13 +22,15 @@
class OverholtError(Exception):
"""Base application error class."""
pass
def __init__(self, msg):
self.msg = msg
class OverholtFormError(Exception):
"""Raise when an error processing a form occurs."""
def __init__(self, errors):
def __init__(self, errors=None):
self.errors = errors
View
@@ -74,6 +74,12 @@ def test_add_manager(self):
r = self.jput(e)
self.assertOkJson(r)
def test_add_existing_manager(self):
e = '/stores/%s/managers/%s' % (self.store.id, self.user.id)
self.jput(e)
r = self.jput(e)
self.assertBadJson(r)
def test_remove_manager(self):
e = '/stores/%s/managers/%s' % (self.store.id, self.user.id)
self.jput(e)

0 comments on commit 1a201ab

Please sign in to comment.