Esempio n. 1
0
    def test_str(self):
        record = MafHeaderRecord("key", "value")
        self.assertEqual(str(record), "#key value")

        record.key = "key2"
        record.value = "value2"
        self.assertEqual(str(record), "#key2 value2")

        record.key = " key2"
        record.value = " value2"
        self.assertEqual(str(record), "# key2  value2")
Esempio n. 2
0
    def test_get_and_set(self):
        record = MafHeaderRecord("key", "value")
        self.assertEqual(record.key, "key")
        self.assertEqual(record.value, "value")

        record.key = "key2"
        record.value = "value2"
        self.assertEqual(record.key, "key2")
        self.assertEqual(record.value, "value2")