mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-19 09:53:34 -06:00
Update test script ObjectVars
This commit is contained in:
parent
c9c79dabef
commit
0d9fc309d5
@ -152,10 +152,7 @@ class ScriptVariablesTest(TestCase):
|
|||||||
def test_objectvar(self):
|
def test_objectvar(self):
|
||||||
|
|
||||||
class TestScript(Script):
|
class TestScript(Script):
|
||||||
|
var1 = ObjectVar(model=DeviceRole)
|
||||||
var1 = ObjectVar(
|
|
||||||
queryset=DeviceRole.objects.all()
|
|
||||||
)
|
|
||||||
|
|
||||||
# Populate some objects
|
# Populate some objects
|
||||||
for i in range(1, 6):
|
for i in range(1, 6):
|
||||||
@ -173,10 +170,7 @@ class ScriptVariablesTest(TestCase):
|
|||||||
def test_multiobjectvar(self):
|
def test_multiobjectvar(self):
|
||||||
|
|
||||||
class TestScript(Script):
|
class TestScript(Script):
|
||||||
|
var1 = MultiObjectVar(model=DeviceRole)
|
||||||
var1 = MultiObjectVar(
|
|
||||||
queryset=DeviceRole.objects.all()
|
|
||||||
)
|
|
||||||
|
|
||||||
# Populate some objects
|
# Populate some objects
|
||||||
for i in range(1, 6):
|
for i in range(1, 6):
|
||||||
|
Loading…
Reference in New Issue
Block a user