def test_merge_modes(self):
     from c2cgeoportal_geoportal.lib.wmstparsing import TimeInformation
     ti = TimeInformation()
     self.assertFalse(ti.has_time())
     self.assertTrue(ti.to_dict() is None)
     ti.merge_mode("single")
     self.assertEqual(ti.mode, "single")
     ti.merge_mode("single")
     self.assertEqual(ti.mode, "single")
    def test_merge_different_modes(self):
        from c2cgeoportal_geoportal.lib.wmstparsing import TimeInformation

        ti = TimeInformation()
        ti.merge_mode("single")
        self.assertRaises(ValueError, ti.merge_mode, "range")