Re: Mocking models or at least creating Fakes.

2019-07-24 Thread Roger Gammans
> class TestThing(TestCase):def test_x():fake = > FakeThingy()out = m.Foo( thing = fake ) > > All the error come from the last line when I try to construct a Foo. > Without FakeThinky deriving from Thingy I get a error that fake is > not of the correct class, > and it is (as sh

Mocking models or at least creating Fakes.

2019-07-24 Thread Roger Gammans
Hi, The django ORM is being far to helpful for me in this case; I need to find some method of bypasssing it; for my unittests. I've got system which look something like:- ## In models.pyclass Thingy(models.Model):friendly_name = models.CharField(max_length =200)title = models.CharField(max_