Add DRBD barriers disk parameters
[ganeti-local] / test / ganeti.serializer_unittest.py
index 3e68efa..a4f7837 100755 (executable)
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 0.0510-1301, USA.
+# 02110-1301, USA.
 
 
 """Script for unittesting the serializer module"""
 
 
 import unittest
-import warnings
 
 from ganeti import serializer
 from ganeti import errors
-from ganeti import compat
 
 import testutils
 
@@ -109,24 +107,5 @@ class TestSerializer(testutils.GanetiTestCase):
                       serializer.DumpJson(tdata), "mykey")
 
 
-class TestInvalidDictionaryKey(unittest.TestCase):
-  def _Test(self, data):
-    if serializer._OLD_SIMPLEJSON:
-      # Using old "simplejson", can't really test
-      warnings.warn("This test requires Python 2.6 or above to function"
-                    " correctly")
-      self.assertTrue(serializer.DumpJson(data))
-    else:
-      self.assertRaises(ValueError, serializer.DumpJson, data)
-
-  def test(self):
-    for value in [123, 1.1, -1, -9492.1123, -3234e-4]:
-      self._Test({value: ""})
-
-  def testAllowed(self):
-    for value in ["", "Hello World", None, True, False]:
-      self.assertTrue(serializer.DumpJson({value: ""}))
-
-
 if __name__ == '__main__':
   testutils.GanetiTestProgram()