class PersonFactory(factory.alchemy.SQLAlchemyFactory):


    class Meta:
        model = Person
address_1 = factory.RelatedFactory(AddressFactory, 'person')
address_2 = factory.RelatedFactory(AddressFactory, 'person')
One-to-many relationships in factory_boy