Fix test running without django (Closes #161).
Fix test running without django (Closes #161).

yograterol/factory_boy,QuantumGhost/factory_boy,muhammad-ammar/factory_boy,rbarrois/factory_boy,mapleoin/factory_boy,adamchainz/factory_boy,FactoryBoy/factory_boy,kamotos/factory_boy,dpausp/factory_boy,rrauenza/factory_boy,fizista/factory_boy