Re: New to testing

2013-04-10 Thread Lachlan Musicman
On 11 April 2013 14:48, Lachlan Musicman wrote: >>> On 11/04/2013 2:02pm, Lachlan Musicman wrote: >>> >>> Inside your test class before writing tests you can have ... >>> >>> def setUp(self): >>> >>> jack = MaleAccountFactory() >>> jill = FemaleAccountFactory() >>> >>> def

Re: New to testing

2013-04-10 Thread Mike Dewhirst
On 11/04/2013 2:42pm, Lachlan Musicman wrote: On 11 April 2013 14:23, Mike Dewhirst wrote: On 11/04/2013 2:02pm, Lachlan Musicman wrote: Inside your test class before writing tests you can have ... def setUp(self): jack = MaleAccountFactory() jill = FemaleAccountFactor

Re: New to testing

2013-04-10 Thread Lachlan Musicman
On 11 April 2013 14:42, Lachlan Musicman wrote: > On 11 April 2013 14:23, Mike Dewhirst wrote: >> On 11/04/2013 2:02pm, Lachlan Musicman wrote: >> >> Inside your test class before writing tests you can have ... >> >> def setUp(self): >> >> jack = MaleAccountFactory() >> jill =

Re: New to testing

2013-04-10 Thread Lachlan Musicman
On 11 April 2013 14:23, Mike Dewhirst wrote: > On 11/04/2013 2:02pm, Lachlan Musicman wrote: > > Inside your test class before writing tests you can have ... > > def setUp(self): > > jack = MaleAccountFactory() > jill = FemaleAccountFactory() > > def tearDown(self): >

Re: New to testing

2013-04-10 Thread Mike Dewhirst
On 11/04/2013 2:02pm, Lachlan Musicman wrote: Hi I'm new to testing. Not to Django. To my shame. I'm trying to test some m2m signals connections, so I have a Inside your test class before writing tests you can have ... def setUp(self): jack = MaleAccountFactory()

Re: New to testing

2013-04-10 Thread Shawn Milochik
Create a function with a name that *doesn't* start with "test" and you can easily do what you want. Then both tests can call it. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, s

New to testing

2013-04-10 Thread Lachlan Musicman
Hi I'm new to testing. Not to Django. To my shame. I'm trying to test some m2m signals connections, so I have a def test_parent_account_creation(self): jack = MaleAccountFactory() jill = FemaleAccountFactory() jack.parents.add(jill) self.assertIn(jill, jack.p