mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-25 02:17:37 +00:00
move test around
This commit is contained in:
@@ -1191,18 +1191,17 @@ class BuildListTest(BuildAPITest):
|
|||||||
|
|
||||||
def test_output_options(self):
|
def test_output_options(self):
|
||||||
"""Test the output options for BuildOrderList list."""
|
"""Test the output options for BuildOrderList list."""
|
||||||
|
url = self.url
|
||||||
test_cases = [
|
test_cases = [
|
||||||
('user_detail', 'issued_by_detail'),
|
|
||||||
('user_detail', 'responsible_detail'),
|
|
||||||
('project_code_detail', 'project_code_detail'),
|
|
||||||
('project_code_detail', 'project_code'),
|
('project_code_detail', 'project_code'),
|
||||||
|
('project_code_detail', 'project_code_detail'),
|
||||||
|
('user_detail', 'responsible_detail'),
|
||||||
|
('user_detail', 'issued_by_detail'),
|
||||||
]
|
]
|
||||||
|
|
||||||
for param, field in test_cases:
|
for param, field in test_cases:
|
||||||
# Test with parameter set to 'true'
|
# Test with parameter set to 'true'
|
||||||
response = self.get(
|
response = self.get(url, {param: 'true', 'limit': 1}, expected_code=200)
|
||||||
self.url, {param: 'true', 'limit': 1}, expected_code=200
|
|
||||||
)
|
|
||||||
self.assertIn(
|
self.assertIn(
|
||||||
field,
|
field,
|
||||||
response.data['results'][0],
|
response.data['results'][0],
|
||||||
@@ -1210,9 +1209,7 @@ class BuildListTest(BuildAPITest):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Test with parameter set to 'false'
|
# Test with parameter set to 'false'
|
||||||
response = self.get(
|
response = self.get(url, {param: 'false', 'limit': 1}, expected_code=200)
|
||||||
self.url, {param: 'false', 'limit': 1}, expected_code=200
|
|
||||||
)
|
|
||||||
self.assertNotIn(
|
self.assertNotIn(
|
||||||
field,
|
field,
|
||||||
response.data['results'][0],
|
response.data['results'][0],
|
||||||
|
|||||||
Reference in New Issue
Block a user