generate path_leaf unit test from models.py
This commit is contained in:
parent
9a813f77a3
commit
ed6c202ffa
1 changed files with 10 additions and 1 deletions
|
@ -810,7 +810,7 @@ class BackendTests(TestCase):
|
|||
"""
|
||||
Tests the get_data function in models.py
|
||||
|
||||
:return: no value
|
||||
:return: None
|
||||
"""
|
||||
test_obj = Mock()
|
||||
|
||||
|
@ -844,6 +844,15 @@ class BackendTests(TestCase):
|
|||
result_int = Field.get_datatype(test_obj)
|
||||
self.assertEqual(result_int, 99)
|
||||
|
||||
def test_path_leaf(self):
|
||||
"""
|
||||
Tests the path_leaf function in models.py
|
||||
|
||||
:return: None
|
||||
"""
|
||||
result = Field.path_leaf(Mock(), "uploads/2018/01/01/file.jpg")
|
||||
self.assertEqual(result, "file.jpg")
|
||||
|
||||
def test_get_files(self):
|
||||
"""
|
||||
Test getting files from a report.
|
||||
|
|
Loading…
Reference in a new issue