Beispiel #1
0
 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))
Beispiel #2
0
 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))
Beispiel #3
0
 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))
Beispiel #4
0
 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))