factory-boy Questions

1

Solved

The code: class StockFactory(UniqueObjectsFactory): FACTORY_FOR = Stock FACTORY_DJANGO_GET_OR_CREATE = ('name', 'market') market = factory.SubFactory(MarketFactory) symbol = FuzzyAttribute(lambd...
Oakie asked 3/3, 2014 at 8:10

2

Solved

When I create factory_boy objects, the object doesn't appear to have a primary key and I'm not sure why. Here's my model and factory: # models.py from django.db import models from django.contrib.a...
Mentor asked 23/9, 2013 at 15:47

1

Solved

Is there any way to suppress (i.e. hide) the captured logging information block factory boy generates when a test fails or generates an error? I'm talking about this: SomeError: you encountered an...
Fogle asked 3/10, 2013 at 15:35

2

I'm trying to use factory_boy to help generate some MongoEngine documents for my tests. I'm having trouble defining EmbeddedDocumentField objects. Here's my MongoEngine Document: class Comment(Em...
Bohi asked 15/1, 2013 at 20:22

1

I am working on a Pyramid app with SQLAlchemy as the ORM. I am trying to test a model with a class method: # this is essentially a global used by all the models Session = scoped_session(sessionmak...
Teague asked 9/7, 2013 at 5:54

1

I have one problem with testing django app by using LiveServerTestCase. LiveServerTestCase execute setUp() function before executing each test. But I'm using factory-boy's factories to create objec...
Quasimodo asked 21/10, 2012 at 11:31

2

Solved

I'm just getting started with the factory_boy django library for test factories, and having an issue with a duplicate key constraint violation. test_member_programme.py from datetime import date,...
Traumatize asked 30/8, 2012 at 21:33

© 2022 - 2024 — McMap. All rights reserved.