forked from enviPath/enviPy
[Enhancement] Swappable Packages (#216)
Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#216 Reviewed-by: liambrydon <lbry121@aucklanduni.ac.nz> Reviewed-by: Tobias O <tobias.olenyi@envipath.com>
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
from unittest.mock import patch, MagicMock, PropertyMock
|
||||
from unittest.mock import MagicMock, PropertyMock, patch
|
||||
|
||||
from django.conf import settings as s
|
||||
from django.test import TestCase
|
||||
|
||||
from epdb.logic import PackageManager
|
||||
from epdb.models import User, SimpleAmbitRule
|
||||
from epdb.models import SimpleAmbitRule, User
|
||||
|
||||
|
||||
class SimpleAmbitRuleTest(TestCase):
|
||||
@ -209,7 +210,7 @@ class SimpleAmbitRuleTest(TestCase):
|
||||
|
||||
self.assertEqual(rule.products_smarts, expected_products)
|
||||
|
||||
@patch("epdb.models.Package.objects")
|
||||
@patch(f"{s.EPDB_PACKAGE_MODEL.replace('.', '.models.')}.objects")
|
||||
def test_related_reactions_property(self, mock_package_objects):
|
||||
"""Test related_reactions property returns correct queryset."""
|
||||
mock_qs = MagicMock()
|
||||
|
||||
Reference in New Issue
Block a user