Updated to use factory_boy instead of relying on normal object creation