diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/IObject.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/IObject.cpp
index eb6d51ecd5d917747a93eb63bb27999b113f58d4..7f059c499044c8ba2445cfbbd95661234d308dc1 100644
--- a/Framework/PythonInterface/mantid/geometry/src/Exports/IObject.cpp
+++ b/Framework/PythonInterface/mantid/geometry/src/Exports/IObject.cpp
@@ -4,6 +4,7 @@
 #include <boost/python/class.hpp>
 #include <boost/python/register_ptr_to_python.hpp>
 
+using Mantid::Geometry::CSGObject;
 using Mantid::Geometry::IObject;
 using namespace boost::python;
 
diff --git a/Framework/PythonInterface/test/python/mantid/api/SampleTest.py b/Framework/PythonInterface/test/python/mantid/api/SampleTest.py
index f8d72febd011219295c34ab5fbbe114acc042fef..307b28b954bf34180ced14bd2c256358d310f9ee 100644
--- a/Framework/PythonInterface/test/python/mantid/api/SampleTest.py
+++ b/Framework/PythonInterface/test/python/mantid/api/SampleTest.py
@@ -72,9 +72,11 @@ class SampleTest(unittest.TestCase):
         sample = self._ws.sample()
         self.assertEquals(type(sample.getShape()), CSGObject)
 
-    #def test_get_shape_xml(self):
-    #    sample = self._ws.sample()
-    #    self.assertEquals(type(sample.getShapeXML()), str)
+    def test_get_shape_xml(self):
+        sample = self._ws.sample()
+        shape = sample.getShape()
+        xml = shape.getShapeXML()
+        self.assertEquals(type(xml), str)