1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Add bulk edit view tests

This commit is contained in:
Jeremy Stretch
2020-02-03 13:32:53 -05:00
parent 4aa694f044
commit d431efb7d4
8 changed files with 491 additions and 140 deletions

View File

@@ -33,6 +33,10 @@ class TagTestCase(StandardTestCases.Views):
'comments': 'Some comments',
}
cls.bulk_edit_data = {
'color': '00ff00',
}
class ConfigContextTestCase(StandardTestCases.Views):
model = ConfigContext
@@ -53,7 +57,7 @@ class ConfigContextTestCase(StandardTestCases.Views):
for i in range(1, 4):
configcontext = ConfigContext(
name='Config Context {}'.format(i),
data='{{"foo": {}}}'.format(i)
data={'foo': i}
)
configcontext.save()
configcontext.sites.add(site)
@@ -73,7 +77,14 @@ class ConfigContextTestCase(StandardTestCases.Views):
'data': '{"foo": 123}',
}
cls.bulk_edit_data = {
'weight': 300,
'is_active': False,
'description': 'New description',
}
# TODO: Convert to StandardTestCases.Views
class ObjectChangeTestCase(TestCase):
user_permissions = (
'extras.view_objectchange',