Christoph Zwerschke schrieb:
> Diez B. Roggisch schrieb:
>> Just for the fun of it, I downgraded to TJ 1.1.3 - to no avail.
> 
> Which error message do you get with TJ 1.1.3? What's in your json.py and 
> test_json_so_works?

Ok, I just tried to make things work from scratch. I might before 
accidentially mixed the VE with the system-wide site-packages, so I ran 
VE with --no-site-packages

Then I installed TG1.0.5. Went without a hitch, and tg-admin info gives 
the below result.


Then I ran my test again. It fails with:


======================================================================
ERROR: This test ensures that the SO object inheritance is respected in 
jsonification.
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/Users/deets/projects/artnology/Van_Abbe_RMS/Van-Abbe-RMS/varms/tests/test_model.py",
 
line 643, in test_json_so_works
     json = jsonify(g)
   File "<string>", line 5, in jsonify
   File "_d_speedups.pyx", line 403, in 
_d_speedups.BaseDispatcher.__getitem__
   File "build/bdist.macosx-10.3-fat/egg/dispatch/interfaces.py", line 
15, in __call__
     raise self.__class__(*self.args+(args,kw))
AmbiguousMethod: ([(Signature((3, <class 
'dispatch.strategy.Node'>)=TruthCriterion(True),(2, <class 
'dispatch.strategy.Node'>)=TruthCriterion(False)), <function 
jsonify_sqlobject at 0x18f4630>), (Signature((0, <class 
'dispatch.strategy.Node'>)=User), <function jsonify_user at 
0x1d814f0>)], (<Guide 1 user_name=u'charles' 
email_address=u'[EMAIL PROTECTED]' display_name=u'Charles' 
password=u'Wafer-thin Mint' created='datetime.datetime...)'>,), {})

The test looks like this:


     def test_json_so_works(self):
         """
         This test ensures that the SO object inheritance is respected 
in jsonification.
         """
         guides = Group(group_name="guides", display_name="Guides")
         g = Guide(user_name = "charles",
                   email_address = "[EMAIL PROTECTED]",
                   display_name = "Charles",
                   password = "Wafer-thin Mint",
                   )
         json = jsonify(g)
         try:
             json['display_name'] == "Charles"
         except KeyError:
             assert False, "No base-class-attributes were jsonified"



It shall test that the InheritableSQLObject-hierachy is walked down to 
get all attributes.

Diez

===== tg-admin info =======

TurboGears Complete Version Information

TurboGears requires:

* TurboGears 1.0.4.4
* TurboKid 1.0.4
* TurboJson 1.1.3
* TurboCheetah 1.0
* simplejson 1.9.1
* setuptools 0.6c8
* RuleDispatch 0.5a1.dev-r2506
* PasteScript 1.6.3
* FormEncode 1.0.1
* DecoratorTools 1.7
* configobj 4.5.3
* CherryPy 2.3.0
* kid 0.9.6
* Cheetah 2.0.1
* Extremes 1.1
* PyProtocols 1.0a0dev-r2302
* PasteDeploy 1.3.2
* Paste 1.7.1
* DecoratorTools 1.7

Toolbox Gadgets

* info (TurboGears 1.0.4.4)
* catwalk (TurboGears 1.0.4.4)
* shell (TurboGears 1.0.4.4)
* designer (TurboGears 1.0.4.4)
* widgets (TurboGears 1.0.4.4)
* admi18n (TurboGears 1.0.4.4)

Identity Providers

* sqlobject (TurboGears 1.0.4.4)
* sqlalchemy (TurboGears 1.0.4.4)

tg-admin Commands

* info (TurboGears 1.0.4.4)
* shell (TurboGears 1.0.4.4)
* quickstart (TurboGears 1.0.4.4)
* update (TurboGears 1.0.4.4)
* sql (TurboGears 1.0.4.4)
* i18n (TurboGears 1.0.4.4)
* toolbox (TurboGears 1.0.4.4)

Visit Managers

* sqlobject (TurboGears 1.0.4.4)
* sqlalchemy (TurboGears 1.0.4.4)

Template Engines

* kid (TurboKid 1.0.4)
* json (TurboJson 1.1.3)
* cheetah (TurboCheetah 1.0)

Widget Packages

* dbryuiwidgets (DBR-YUI-Widgets 0.1)
* dbrremoteform (DBR-RemoteForm 0.1)
* tgmochikit (tgMochiKit 0.2alpha)

TurboGears Extensions

* turbomail (TurboMail 2.1)
* visit (TurboGears 1.0.4.4)
* identity (TurboGears 1.0.4.4)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to