mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	fix test
This commit is contained in:
		@@ -4,7 +4,7 @@ Plugin model definitions
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# -*- coding: utf-8 -*-
 | 
					# -*- coding: utf-8 -*-
 | 
				
			||||||
from __future__ import unicode_literals
 | 
					from __future__ import unicode_literals
 | 
				
			||||||
from logging import warning
 | 
					import warnings
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from django.utils.translation import gettext_lazy as _
 | 
					from django.utils.translation import gettext_lazy as _
 | 
				
			||||||
from django.db import models
 | 
					from django.db import models
 | 
				
			||||||
@@ -100,7 +100,7 @@ class PluginConfig(models.Model):
 | 
				
			|||||||
            if (self.active is False and self.__org_active is True) or \
 | 
					            if (self.active is False and self.__org_active is True) or \
 | 
				
			||||||
               (self.active is True and self.__org_active is False):
 | 
					               (self.active is True and self.__org_active is False):
 | 
				
			||||||
                if settings.PLUGIN_TESTING:
 | 
					                if settings.PLUGIN_TESTING:
 | 
				
			||||||
                    warning('A reload was triggered')
 | 
					                    warnings.warn('A reload was triggered')
 | 
				
			||||||
                registry.reload_plugins()
 | 
					                registry.reload_plugins()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return ret
 | 
					        return ret
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -146,7 +146,7 @@ class PluginDetailAPITest(InvenTreeAPITestCase):
 | 
				
			|||||||
        self.assertDictContainsSubset({'base':{'key':'base', 'human_name':'base'}}, mixin_dict)
 | 
					        self.assertDictContainsSubset({'base':{'key':'base', 'human_name':'base'}}, mixin_dict)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # check reload on save
 | 
					        # check reload on save
 | 
				
			||||||
        with self.assertWarns('A reload was triggered'):
 | 
					        with self.assertWarns(Warning('A reload was triggered')):
 | 
				
			||||||
            plg_inactive = fixtures.filter(active=False).first()
 | 
					            plg_inactive = fixtures.filter(active=False).first()
 | 
				
			||||||
            plg_inactive.active = True
 | 
					            plg_inactive.active = True
 | 
				
			||||||
            plg_inactive.save()
 | 
					            plg_inactive.save()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user