Permalink
Browse files

Set the name for sharing resources, for consistency

  • Loading branch information...
1 parent 1f0687e commit 66f304881bd0c7cce1a65affd119bfad3621b3ed @william-gr william-gr committed Sep 11, 2013
Showing with 8 additions and 3 deletions.
  1. +3 −0 gui/api/resources.py
  2. +3 −3 gui/api/tests/sharing.py
  3. +2 −0 gui/sharing/admin.py
View
@@ -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):
View
@@ -19,7 +19,7 @@ def setUp(self):
)
-class CIFS_ShareResourceTest(CommonMixin, APITestCase):
+class CIFSResourceTest(CommonMixin, APITestCase):
def test_get_list_unauthorzied(self):
self.assertHttpUnauthorized(
@@ -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(
@@ -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(
View
@@ -26,6 +26,7 @@ class AFPShareFAdmin(BaseFreeAdmin):
'afp_comment',
'afp_path',
)
+ resource_name = 'sharing/afp'
class CIFSShareFAdmin(BaseFreeAdmin):
@@ -47,6 +48,7 @@ class CIFSShareFAdmin(BaseFreeAdmin):
'cifs_browsable',
'cifs_guestok',
)
+ resource_name = 'sharing/cifs'
class NFSShareFAdmin(BaseFreeAdmin):

0 comments on commit 66f3048

Please sign in to comment.