Quantcast
Channel: Using Factory Boy with GeoDjango PointFields - Stack Overflow
Browsing latest articles
Browse All 5 View Live

Answer by djangonaut for Using Factory Boy with GeoDjango PointFields

I believe you need to create a custom fuzzy attribute for point instances. Can you try this? Right now I don't have the setup to run it all through. import random from django.contrib.gis.geos import...

View Article


Using Factory Boy with GeoDjango PointFields

I'm working on writing tests for a new GeoDjango project I've started. Normally I used Factory Boy and Faker to create model instances for testing. However it's not clear to me how you can mock...

View Article


Answer by Steven B for Using Factory Boy with GeoDjango PointFields

Faker already has some nice geo features. You can create you own provider to make it work for Django, for example:import factory from faker.providers import BaseProvider from django.contrib.gis.geos...

View Article

Answer by mathias.lantean for Using Factory Boy with GeoDjango PointFields

Fussy is about to be deprecated as Factory Boy documentation says.Now that FactoryBoy includes the factory.Faker class, most of these built-in fuzzers are deprecated in favor of their Faker...

View Article

Answer by vikki for Using Factory Boy with GeoDjango PointFields

You can also set the value directly.import jsonfrom factory import LazyAttributefrom factory.django import DjangoModelFactoryclass PlaceFactory(DjangoModelFactory): static_location = "{'type': 'Point',...

View Article

Browsing latest articles
Browse All 5 View Live