| OLD | NEW |
| (Empty) | |
| 1 #!/usr/bin/env python |
| 2 # Copyright 2017 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 import unittest |
| 7 |
| 8 import model |
| 9 |
| 10 |
| 11 PRETTY_XML = """ |
| 12 <!-- Comment1 --> |
| 13 |
| 14 <ukm-configuration> |
| 15 |
| 16 <event name="Event1"> |
| 17 <owner>owner@chromium.org</owner> |
| 18 <summary> |
| 19 Event1 summary. |
| 20 </summary> |
| 21 <metric name="Metric1"> |
| 22 <owner>owner2@chromium.org</owner> |
| 23 <summary> |
| 24 Metric1 summary. |
| 25 </summary> |
| 26 </metric> |
| 27 <metric name="Metric2"/> |
| 28 </event> |
| 29 |
| 30 </ukm-configuration> |
| 31 """.strip() |
| 32 |
| 33 |
| 34 class UkmXmlTest(unittest.TestCase): |
| 35 |
| 36 def testIsPretty(self): |
| 37 result = model.UpdateXML(PRETTY_XML) |
| 38 self.assertMultiLineEqual(PRETTY_XML, result.strip()) |
| 39 |
| 40 |
| 41 if __name__ == '__main__': |
| 42 unittest.main() |
| OLD | NEW |