From 04c71eddd8d6146487f3041d44dd6188b41aa94c Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Tue, 16 Jun 2020 01:08:10 +0700 Subject: [PATCH] Use bakery if present Closes https://github.com/alsur/django-admin-auto-tests/issues/3 --- admin_auto_tests/test_model.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/admin_auto_tests/test_model.py b/admin_auto_tests/test_model.py index 607838c..5d41e27 100644 --- a/admin_auto_tests/test_model.py +++ b/admin_auto_tests/test_model.py @@ -2,7 +2,10 @@ import factory from django.contrib.auth import get_user_model -from model_mommy import mommy +try: + from model_bakery import bakery as mommy +except ImportError: + from model_mommy import mommy try: from django.core.urlresolvers import reverse