def test_format_class(self):
        frmt = Format('mimetype', schema='halloworld', encoding='asdf',
                      validate=self.validate)

        self.assertEqual(frmt.mime_type, 'mimetype')
        self.assertEqual(frmt.schema, 'halloworld')
        self.assertEqual(frmt.encoding, 'asdf')
        self.assertTrue(frmt.validate('the input', 1))

        describeel = frmt.describe_xml()
        self.assertEqual('Format', describeel.tag)
        mimetype = xpath_ns(describeel, '/Format/MimeType')
        encoding = xpath_ns(describeel, '/Format/Encoding')
        schema = xpath_ns(describeel, '/Format/Schema')

        self.assertTrue(mimetype)
        self.assertTrue(encoding)
        self.assertTrue(schema)

        self.assertEqual(mimetype[0].text, 'mimetype')
        self.assertEqual(encoding[0].text, 'asdf')
        self.assertEqual(schema[0].text, 'halloworld')

        frmt2 = get_format('GML')

        self.assertFalse(frmt.same_as(frmt2))
Test pywps.formats.Format class
dataset/ETHPy150Open geopython/pywps/tests/test_formats.py/FormatsTest.test_format_class