diff --git a/xos/tosca/tests/basetest.py b/xos/tosca/tests/basetest.py
index db3ffb7..f7f04eb 100644
--- a/xos/tosca/tests/basetest.py
+++ b/xos/tosca/tests/basetest.py
@@ -80,6 +80,11 @@
                                       props = props,
                                       reqs= reqs)
 
+    def make_user_template(self):
+        return self.make_nodetemplate("test@user.com", "tosca.nodes.User",
+             props = {"firstname": "test", "lastname": "user", "password": "letmein"},
+             reqs = [("testsite", "tosca.relationships.MemberOfSite")])
+
     def make_random_string(self,desired_len):
         return ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(desired_len))
 
diff --git a/xos/tosca/tests/deploymenttest.py b/xos/tosca/tests/deploymenttest.py
index a08b2f9..b194b64 100644
--- a/xos/tosca/tests/deploymenttest.py
+++ b/xos/tosca/tests/deploymenttest.py
@@ -1,6 +1,6 @@
 from basetest import BaseToscaTest
 
-from core.models import Deployment, Image
+from core.models import Deployment, Image, User, DeploymentPrivilege
 
 class DeploymentTest(BaseToscaTest):
     tests = ["create_deployment_minimal",
@@ -9,6 +9,7 @@
              "create_deployment_two_flavors",
              "create_deployment_one_image",
              "create_deployment_two_images",
+             "create_deployment_privilege",
              "destroy_deployment",
                            ]
 
@@ -16,6 +17,7 @@
         self.try_to_delete(Deployment, name="testdep")
         self.try_to_delete(Image, name="testimg1")
         self.try_to_delete(Image, name="testimg2")
+        self.try_to_delete(User, email="test@user.com")
 
     def create_deployment_minimal(self):
         self.assert_noobj(Deployment, "testdep")
@@ -73,6 +75,18 @@
                                    accessControl="allow all")
         assert( sorted([f.name for f in dep.images.all()]) == ["testimg1", "testimg2"] )
 
+    def create_deployment_privilege(self):
+        self.assert_noobj(Deployment, "testdep")
+        self.execute(self.make_nodetemplate("testsite", "tosca.nodes.Site") +
+                     self.make_user_template() +
+                     self.make_nodetemplate("testdep", "tosca.nodes.Deployment",
+                                            reqs=[("test@user.com", "tosca.relationships.AdminPrivilege")]))
+        dep = self.assert_obj(Deployment, "testdep")
+        user = User.objects.get(email="test@user.com")
+
+        dps = DeploymentPrivilege.objects.filter(user=user, deployment=dep)
+        assert(len(dps) == 1)
+
     def destroy_deployment(self):
         self.assert_noobj(Deployment, "testdep")
         self.execute(self.make_nodetemplate("testdep", "tosca.nodes.Deployment"))
diff --git a/xos/tosca/tests/slicetest.py b/xos/tosca/tests/slicetest.py
index 484d7c8..315f862 100644
--- a/xos/tosca/tests/slicetest.py
+++ b/xos/tosca/tests/slicetest.py
@@ -1,10 +1,11 @@
 from basetest import BaseToscaTest
 
-from core.models import Slice, Site
+from core.models import Slice, Site, User, SlicePrivilege
 
 class SliceTest(BaseToscaTest):
     tests = ["create_slice_minimal",
              "create_slice_maximal",
+             "create_slice_privilege",
              "destroy_slice"]
 
     def cleanup(self):
@@ -29,6 +30,19 @@
                                              reqs=[("testsite", "tosca.relationships.MemberOfSite")]))
         self.assert_obj(Slice, "testsite_testslice", enabled=False, description="foo", slice_url="http://foo.com/", max_instances=11)
 
+    def create_slice_privilege(self):
+        self.assert_noobj(Slice, "testsite_testslice")
+        self.execute(self.get_base_templates() +
+                     self.make_user_template() +
+                     self.make_nodetemplate("testsite_testslice", "tosca.nodes.Slice",
+                                            reqs=[("testsite", "tosca.relationships.MemberOfSite"),
+                                                  ("test@user.com", "tosca.relationships.AdminPrivilege")]))
+        slice = self.assert_obj(Slice, "testsite_testslice")
+        user = User.objects.get(email="test@user.com")
+
+        dps = SlicePrivilege.objects.filter(user=user, slice=slice)
+        assert(len(dps) == 1)
+
     def destroy_slice(self):
         self.assert_noobj(Slice, "testsite_testslice")
         self.execute(self.get_base_templates() +
