diff --git a/xos/synchronizers/new_base/model_policies/test_model_policy_tenantwithcontainer.py b/xos/synchronizers/new_base/model_policies/test_model_policy_tenantwithcontainer.py
index b137c44..968fe96 100644
--- a/xos/synchronizers/new_base/model_policies/test_model_policy_tenantwithcontainer.py
+++ b/xos/synchronizers/new_base/model_policies/test_model_policy_tenantwithcontainer.py
@@ -1,6 +1,7 @@
 import unittest
 from mock import patch
 import mock
+import pdb
 
 import os, sys
 sys.path.append("../../..")
@@ -11,19 +12,60 @@
 
 import synchronizers.new_base.modelaccessor
 
-from model_policy_tenantwithcontainer import TenantWithContainerPolicy
+import model_policy_tenantwithcontainer
+from model_policy_tenantwithcontainer import TenantWithContainerPolicy, LeastLoadedNodeScheduler
 
-class MockTenant:
+class MockObject:
+    objects = None
+    def __init__(self, **kwargs):
+        for (k,v) in kwargs.items():
+            setattr(self,k,v)
+    def save(self):
+        pass
+    def delete(self):
+        pass
+
+class MockFlavor(MockObject):
+    name = None
+
+class MockInstance(MockObject):
+    name = None
+
+class MockDeployment(MockObject):
+    name = None
+
+class MockUser(MockObject):
+    email = None
+
+class MockSlice(MockObject):
+    name = None
+
+class MockNode(MockObject):
+    hostname = None
+    site_deployment = None
+
+class MockImage(MockObject):
+    name = None
+
+class MockTenant(MockObject):
     provider_service = None
     deleted = False
     instance = None
+    creator = None
     service_specific_attribute = {}
 
-class TestModelPolicyVsgTenant(unittest.TestCase):
+    def get_image(self):
+        return None
+
+class TestModelPolicyTenantWithContainer(unittest.TestCase):
     def setUp(self):
         self.policy = TenantWithContainerPolicy()
-        self.tenant = MockTenant()
-        
+        self.user = MockUser(email="testadmin@test.org")
+        self.tenant = MockTenant(creator=self.user)
+        self.flavor = MockFlavor(name="m1.small")
+        model_policy_tenantwithcontainer.Instance = MockInstance
+        model_policy_tenantwithcontainer.Flavor = MockFlavor
+
     @patch.object(MockTenant, "provider_service")
     def test_manage_container_no_slices(self, provider_service):
         provider_service.slices.count.return_value = 0
@@ -31,5 +73,78 @@
             self.policy.manage_container(self.tenant)
         self.assertEqual(e.exception.message, "The service has no slices")
 
+    @patch.object(MockTenant, "provider_service")
+    @patch.object(MockTenant, "save")
+    @patch.object(TenantWithContainerPolicy, "get_image")
+    @patch.object(LeastLoadedNodeScheduler, "pick")
+    @patch.object(MockNode, "site_deployment")
+    @patch.object(MockInstance, "save")
+    @patch.object(MockInstance, "delete")
+    def test_manage_container(self, instance_delete, instance_save, site_deployment, pick, get_image, tenant_save, provider_service):
+        # setup mocks
+        node = MockNode(hostname="my.node.com")
+        slice = MockSlice(name="mysite_test1", default_flavor=self.flavor, default_isolation="vm")
+        image = MockImage(name="trusty-server-multi-nic")
+        deployment = MockDeployment(name="testdeployment")
+        provider_service.slices.count.return_value = 1
+        provider_service.slices.all.return_value = [slice]
+        provider_service.slices.first.return_value = slice
+        get_image.return_value = image
+        pick.return_value = (node, None)
+        site_deployment.deployment = deployment
+        # done setup mocks
+
+        # call manage_container
+        self.policy.manage_container(self.tenant)
+
+        # make sure manage_container did what it is supposed to do
+        self.assertNotEqual(self.tenant.instance, None)
+        self.assertEqual(self.tenant.instance.creator.email, "testadmin@test.org")
+        self.assertEqual(self.tenant.instance.image.name, "trusty-server-multi-nic")
+        self.assertEqual(self.tenant.instance.flavor.name, "m1.small")
+        self.assertEqual(self.tenant.instance.isolation, "vm")
+        self.assertEqual(self.tenant.instance.node.hostname, "my.node.com")
+        self.assertEqual(self.tenant.instance.slice.name, "mysite_test1")
+        self.assertEqual(self.tenant.instance.parent, None)
+        instance_save.assert_called()
+        instance_delete.assert_not_called()
+        tenant_save.assert_called()
+
+    def test_manage_container_delete(self):
+        self.tenant.deleted = True
+
+        # call manage_container
+        self.policy.manage_container(self.tenant)
+
+        # make sure manage_container did what it is supposed to do
+        self.assertEqual(self.tenant.instance, None)
+
+    @patch.object(MockTenant, "provider_service")
+    @patch.object(MockTenant, "save")
+    @patch.object(TenantWithContainerPolicy, "get_image")
+    @patch.object(LeastLoadedNodeScheduler, "pick")
+    @patch.object(MockNode, "site_deployment")
+    @patch.object(MockInstance, "save")
+    @patch.object(MockInstance, "delete")
+    @patch.object(MockFlavor, "objects")
+    def test_manage_container_no_m1_small(self, flavor_objects, instance_delete, instance_save, site_deployment, pick, get_image, tenant_save, provider_service):
+        # setup mocks
+        node = MockNode(hostname="my.node.com")
+        slice = MockSlice(name="mysite_test1", default_flavor=None, default_isolation="vm")
+        image = MockImage(name="trusty-server-multi-nic")
+        deployment = MockDeployment(name="testdeployment")
+        provider_service.slices.count.return_value = 1
+        provider_service.slices.all.return_value = [slice]
+        provider_service.slices.first.return_value = slice
+        get_image.return_value = image
+        pick.return_value = (node, None)
+        site_deployment.deployment = deployment
+        flavor_objects.filter.return_value = []
+        # done setup mocks
+
+        with self.assertRaises(Exception) as e:
+            self.policy.manage_container(self.tenant)
+        self.assertEqual(e.exception.message, "No m1.small flavor")
+
 if __name__ == '__main__':
     unittest.main()
