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

Remove tests for API _choices endpoints

This commit is contained in:
Jeremy Stretch
2020-03-12 10:48:53 -04:00
parent ea9de37dd1
commit a53f854187
8 changed files with 5 additions and 193 deletions

View File

@ -36,33 +36,6 @@ def create_test_user(username='testuser', permissions=None):
return user
def choices_to_dict(choices_list):
"""
Convert a list of field choices to a dictionary suitable for direct comparison with a ChoiceSet. For example:
[
{
"value": "choice-1",
"label": "First Choice"
},
{
"value": "choice-2",
"label": "Second Choice"
}
]
Becomes:
{
"choice-1": "First Choice",
"choice-2": "Second Choice
}
"""
return {
choice['value']: choice['label'] for choice in choices_list
}
@contextmanager
def disable_warnings(logger_name):
"""