コード例 #1
0
ファイル: test_utils.py プロジェクト: chokribr/invenio-1
 def test_get_previous_next_objects_previous_next(self):
     """Test the getting of prev, next object ids from the list."""
     from invenio.modules.workflows.utils import get_previous_next_objects
     objects = [3, 4, 5]
     self.assertEqual(get_previous_next_objects(objects, 4), (3, 5))
コード例 #2
0
ファイル: test_utils.py プロジェクト: SCOAP3/invenio
 def test_get_previous_next_objects_previous_next(self):
     """Test the getting of prev, next object ids from the list."""
     from invenio.modules.workflows.utils import get_previous_next_objects
     objects = [3, 4, 5]
     self.assertEqual(get_previous_next_objects(objects, 4), (3, 5))
コード例 #3
0
ファイル: test_utils.py プロジェクト: chokribr/invenio-1
 def test_get_previous_next_objects_not_there(self):
     """Test the getting of prev, next object ids from the list."""
     from invenio.modules.workflows.utils import get_previous_next_objects
     objects = [3, 4]
     self.assertEqual(get_previous_next_objects(objects, 42), (None, None))
コード例 #4
0
ファイル: test_utils.py プロジェクト: SCOAP3/invenio
 def test_get_previous_next_objects_not_there(self):
     """Test the getting of prev, next object ids from the list."""
     from invenio.modules.workflows.utils import get_previous_next_objects
     objects = [3, 4]
     self.assertEqual(get_previous_next_objects(objects, 42), (None, None))