Unit test for fix pagination links with incorrect endpoint names

The patchset adds unit test and documentation for fixing
broken pagination links with incorrect endpoint names.

Closes-bug: #2058427
Change-Id: I4e7fdba2ae661b9251771ff0daf7842d2e86eac9
This commit is contained in:
Okeke Christian 2024-04-09 16:05:04 +01:00
parent 9d7bf9b1c1
commit b8ac0c8168

View File

@ -0,0 +1,21 @@
import copy
import ddt
from manila.api.views import share_replicas
from manila.common import constants
from manila import test
from manila.tests.api.contrib import stubs
from manila.tests.api import fakes
@ddt.ddt
class ViewBuilderTestCase(test.TestCase):
def setUp(self):
super(ViewBuilderTestCase, self).setUp()
self.builder = share_replicas.ReplicationViewBuilder()
def test__collection_name(self):
self.assertEqual('share_replicas', self.builder._collection_name)
def test__collection_route_name(self):
self.assertEqual('share-replicas', self.builder._collection_name)