Return nodes after use

This returns the nodes after use (or in some cases, before use)
and unlocks them.

Change-Id: I84e998a6099217f0a0924caf1872f33dce28ba01
diff --git a/tests/test_nodepool.py b/tests/test_nodepool.py
index 3019f08..677ae73 100644
--- a/tests/test_nodepool.py
+++ b/tests/test_nodepool.py
@@ -83,6 +83,12 @@
         for node in nodeset.getNodes():
             self.assertEqual(node.state, 'in-use')
 
+        # Return the nodes
+        self.nodepool.returnNodeset(nodeset)
+        for node in nodeset.getNodes():
+            self.assertIsNone(node.lock)
+            self.assertEqual(node.state, 'used')
+
     def test_node_request_disconnect(self):
         # Test that node requests are re-submitted after disconnect