From 4940e9b5cefcd4bf13ce5aa89c642827d9b473dd 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..4a47804 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 baker as mommy +except ImportError: + from model_mommy import mommy try: from django.core.urlresolvers import reverse