# vim: set fileencoding=utf-8 : # (C) 2013 Guido Günther # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . """Test L{pomop.pom} config""" import unittest from pomop.pom import Pom pom_xml = """ 4.0.0 org.sigxcpu.pomop pomop-parent pom 2.7 """ class TestPom(unittest.TestCase): def test_parse(self): """Parse simplistic pom and check values""" p = Pom.parse(pom_xml) self.assertIsNotNone(p) self.assertEqual(p.full_triplet[0], 'org.sigxcpu.pomop') self.assertEqual(p.full_triplet[1], 'pomop-parent') self.assertEqual(p.full_triplet[2], '2.7') self.assertEqual(p.get_parent(), None)