Skip to content

Commit

Permalink
Set the name for sharing resources, for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
william-gr committed Sep 11, 2013
1 parent 1f0687e commit 66f3048
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions gui/api/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,9 @@ def dehydrate(self, bundle):

class NFSShareResourceMixin(object):

class Meta:
resource_name = 'sharing/nfs'

def dehydrate(self, bundle):
bundle = super(NFSShareResourceMixin, self).dehydrate(bundle)
if self.is_webclient(bundle.request):
Expand Down
6 changes: 3 additions & 3 deletions gui/api/tests/sharing.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setUp(self):
)


class CIFS_ShareResourceTest(CommonMixin, APITestCase):
class CIFSResourceTest(CommonMixin, APITestCase):

def test_get_list_unauthorzied(self):
self.assertHttpUnauthorized(
Expand Down Expand Up @@ -125,7 +125,7 @@ def test_Delete(self):
self.assertHttpAccepted(resp)


class AFP_ShareResourceTest(CommonMixin, APITestCase):
class AFPResourceTest(CommonMixin, APITestCase):

def test_get_list_unauthorzied(self):
self.assertHttpUnauthorized(
Expand Down Expand Up @@ -240,7 +240,7 @@ def test_Delete(self):
self.assertHttpAccepted(resp)


class NFS_ShareResourceTest(CommonMixin, APITestCase):
class NFSResourceTest(CommonMixin, APITestCase):

def test_get_list_unauthorzied(self):
self.assertHttpUnauthorized(
Expand Down
2 changes: 2 additions & 0 deletions gui/sharing/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class AFPShareFAdmin(BaseFreeAdmin):
'afp_comment',
'afp_path',
)
resource_name = 'sharing/afp'


class CIFSShareFAdmin(BaseFreeAdmin):
Expand All @@ -47,6 +48,7 @@ class CIFSShareFAdmin(BaseFreeAdmin):
'cifs_browsable',
'cifs_guestok',
)
resource_name = 'sharing/cifs'


class NFSShareFAdmin(BaseFreeAdmin):
Expand Down

0 comments on commit 66f3048

Please sign in to comment.