On Mon, Nov 05, 2012 at 12:55:22AM -0800, jeetu wrote:
> klass and attrs for testing a single table. What if i have multiple tables
> like in many to one relationships. I want to initiate two tables in single
> setup of nosetest. How to do it. I am expecting something like
I'm not sure myself. I've got the following.
class TestParent(ModelTest):
klass = model.Parent
attrs = dict(
child = model.Child(u'Test Child Name')
)
or, just to be confusing:
class TestParent(ModelTest):
klass = model.Parent
def do_get_dependencies(self):
test_child = model.Child(u'Test Child Name')
return {'child': test_child }
I think the second one is more correct but not sure.
--
Craig Small VK2XLZ http://enc.com.au/ csmall at : enc.com.au
Debian GNU/Linux http://www.debian.org/ csmall at : debian.org
GPG fingerprint: 5D2F B320 B825 D939 04D2 0519 3938 F96B DF50 FEA5
--
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.