Browse Source

Name of exceptions

prieto 8 years ago
parent
commit
a4dd1950e2
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      lodel/leapi/leobject.py
  2. 1
    1
      tests/leapi/test_leobject.py

+ 1
- 1
lodel/leapi/leobject.py View File

@@ -82,7 +82,7 @@ class LeObject(object):
82 82
             if fieldname not in allowed_fieldnames:
83 83
                 if fieldname in self._fields:
84 84
                     err_list.append(
85
-                        AttributeError("Value given for internal field : '%s'" % fieldname)
85
+                        LeApiError("Value given for internal field : '%s'" % fieldname)
86 86
                     )
87 87
                 else:
88 88
                     err_list.append(

+ 1
- 1
tests/leapi/test_leobject.py View File

@@ -33,7 +33,7 @@ class LeFilteredQueryTestCase(unittest.TestCase):
33 33
             dyncode.Person(
34 34
                 lodel_id = 1,
35 35
                 foobar = "barfoo")
36
-        with self.assertRaises(LeApiErrors):
36
+        with self.assertRaises(LeApiError):
37 37
             dyncode.Person(lastname = "foo", firstname = "bar")
38 38
 
39 39
     

Loading…
Cancel
Save