Skip to content

Commit

Permalink
Merged elixir-734: Fixed up the elixir tests.
Browse files Browse the repository at this point in the history
Fixes: #734
Author: nick
Reviewer: thijs

git-svn-id: https://svn.pyamf.org/pyamf/trunk@3169 2dde4cc4-cf3c-0410-b1a3-a9b8ff274da5
  • Loading branch information
njoyce committed Feb 4, 2010
1 parent 34ee2c8 commit c6b52ac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions pyamf/adapters/_elixir.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,19 @@ def getCustomProperties(self):
if self.descriptor.parent:
self.parent_descriptor = self.descriptor.parent._descriptor

foreign_constraints = []

for constraint in self.descriptor.constraints:
for col in constraint.columns:
col = str(col)
if col.startswith(self.descriptor.tablename + '.'):
foreign_constraints.append(col[len(self.descriptor.tablename) + 1:])

if self.descriptor.polymorphic:
self.exclude_attrs.update([self.descriptor.polymorphic])

self.exclude_attrs.update(foreign_constraints)

def _compile_base_class(self, klass):
if klass is elixir.EntityBase or klass is elixir.Entity:
return
Expand Down
2 changes: 1 addition & 1 deletion pyamf/remoting/amf3.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def generate_error(request, cls, e, tb, include_traceback=False):

return messaging.ErrorMessage(messageId=generate_random_id(),
clientId=generate_random_id(), timestamp=calendar.timegm(time.gmtime()),
correlationId = request.messageId, faultCode=code, faultString=unicode(e),
correlationId = request.messageId, faultCode=code, faultString=e,
faultDetail=unicode(detail), extendedData=detail, rootCause=rootCause)


Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def get_install_requirements():
ext_modules = get_extensions(),
install_requires = get_install_requirements(),
test_suite = "pyamf.tests.suite",
tests_require=['pysqlite'],
zip_safe = True,
license = "MIT License",
platforms = ["any"],
Expand All @@ -149,6 +150,7 @@ def get_install_requirements():
'django': ['Django>=0.96'],
'sqlalchemy': ['SQLAlchemy>=0.4'],
'cython': ['Cython>=0.10'],
'test': ['pysqlite'],
},
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand Down

0 comments on commit c6b52ac

Please sign in to comment.