diff --git a/xos/tosca/engine.py b/xos/tosca/engine.py
index fc1f10f..3a4aeb2 100644
--- a/xos/tosca/engine.py
+++ b/xos/tosca/engine.py
@@ -44,7 +44,7 @@
 
         self.ordered_nodetemplates = []
         self.ordered_names = self.topsort_dependencies()
-        print "ordered_names", self.ordered_names
+        self.log("ordered_names: %s" % self.ordered_names)
         for name in self.ordered_names:
             if name in self.nodetemplates_by_name:
                 self.ordered_nodetemplates.append(self.nodetemplates_by_name[name])
diff --git a/xos/tosca/tests/basetest.py b/xos/tosca/tests/basetest.py
index 0b5a19d..038eea2 100644
--- a/xos/tosca/tests/basetest.py
+++ b/xos/tosca/tests/basetest.py
@@ -40,6 +40,16 @@
             yml = yml + "      properties:\n"
             for (k,v) in props.items():
                 yml = yml + "          %s: %s\n" % (k, v)
+
+        if reqs:
+            yml = yml + "      requirements:\n"
+            i=0
+            for (name,relat) in reqs:
+                yml = yml + "        - req%d:\n" % i
+                yml = yml + "              node: %s\n" % name
+                yml = yml + "              relationship: %s\n" % relat
+                i = i + 1
+
         return yml
 
     def assert_noobj(self, cls, name):
@@ -53,6 +63,7 @@
             if (getattr(obj,k,None) != v):
                 print "Object %s property '%s' is '%s' and should be '%s'" % (obj, k, getattr(obj,k,None), v)
                 assert(False)
+        return obj
 
     def try_to_delete(self, cls, **kwargs):
         objs = cls.objects.filter(**kwargs)
@@ -64,7 +75,7 @@
 
         #print self.base_yaml+yml
 
-        xt = XOSTosca(self.base_yaml+yml, parent_dir=parentdir, log_to_console=True)
+        xt = XOSTosca(self.base_yaml+yml, parent_dir=parentdir, log_to_console=False)
         xt.execute(u)
 
     def runtest(self):
diff --git a/xos/tosca/tests/servicetest.py b/xos/tosca/tests/servicetest.py
index 023c441..585e143 100644
--- a/xos/tosca/tests/servicetest.py
+++ b/xos/tosca/tests/servicetest.py
@@ -35,11 +35,29 @@
     def update_service_notpublished(self):
         self.assert_noobj(Service, "test_svc")
         self.execute(self.make_nodetemplate("test_svc", "tosca.nodes.Service"))
-        self.assert_obj(Service, "test_svc", kind="generic", published=True, enabled=True)
-        original_id = Service.objects.get(name="test_svc").id
+        original_obj = self.assert_obj(Service, "test_svc", kind="generic", published=True, enabled=True)
         self.execute(self.make_nodetemplate("test_svc", "tosca.nodes.Service", {"published": False}))
-        self.assert_obj(Service, "test_svc", kind="generic", published=False, enabled=True)
-        assert(Service.objects.get(name="test_svc").id == original_id)
+        updated_obj = self.assert_obj(Service, "test_svc", kind="generic", published=False, enabled=True)
+        assert(original_obj.id == updated_obj.id)
+
+    def create_service_maximal(self):
+        self.assert_noobj(Service, "test_svc")
+        self.execute(self.make_nodetemplate("test_svc", "tosca.nodes.Service",
+                        {"kind": "testkind",
+                         "published": False,
+                         "enabled": False,
+                         "view_url": "http://foo/",
+                         "icon_url": "http://bar/",
+                         "public_key": "foobar",
+                         "versionNumber": "1.2"} ))
+        self.assert_obj(Service, "test_svc",
+                         kind="testkind",
+                         published=False,
+                         enabled=False,
+                         view_url="http://foo/",
+                         icon_url="http://bar/",
+                         public_key="foobar",
+                         versionNumber="1.2")
 
 if __name__ == "__main__":
     ServiceTest()
