mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 20:46:47 +00:00
full set again
This commit is contained in:
parent
d03af8f5b0
commit
7d58db4336
@ -24,6 +24,7 @@ import InvenTree.tasks
|
|||||||
|
|
||||||
from stock.models import StockLocation
|
from stock.models import StockLocation
|
||||||
from common.settings import currency_codes
|
from common.settings import currency_codes
|
||||||
|
from plugin.helpers import IntegrationPluginError
|
||||||
|
|
||||||
|
|
||||||
class ValidatorTest(TestCase):
|
class ValidatorTest(TestCase):
|
||||||
@ -443,5 +444,20 @@ class TestSettings(TestCase):
|
|||||||
self.run_reload()
|
self.run_reload()
|
||||||
self.assertEqual(user_count(), 0)
|
self.assertEqual(user_count(), 0)
|
||||||
|
|
||||||
|
# enough set
|
||||||
|
self.env.set('INVENTREE_ADMIN_USER', 'admin') # set username
|
||||||
|
self.env.set('INVENTREE_ADMIN_EMAIL', 'info@example.com') # set email
|
||||||
|
self.env.set('INVENTREE_ADMIN_PASSWORD', 'password123') # set password
|
||||||
|
self.run_reload()
|
||||||
|
self.assertEqual(user_count(), 1)
|
||||||
|
|
||||||
|
# double adding should not work
|
||||||
|
self.env.set('INVENTREE_ADMIN_USER', 'admin') # set username
|
||||||
|
self.env.set('INVENTREE_ADMIN_EMAIL', 'info@example.com') # set email
|
||||||
|
self.env.set('INVENTREE_ADMIN_PASSWORD', 'password123') # set password
|
||||||
|
with self.assertRaises(IntegrationPluginError):
|
||||||
|
self.run_reload()
|
||||||
|
self.assertEqual(user_count(), 1)
|
||||||
|
|
||||||
# make sure to clean up
|
# make sure to clean up
|
||||||
settings.TESTING_ENV = False
|
settings.TESTING_ENV = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user