@@ -0,0 +1,1620 @@
+# Copyright 2018 Open Source Robotics Foundation, Inc.%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#     http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A%0Afrom superflore.generators.ebuild.metadata_xml import metadata_xml%0Aimport xmltodict%0Aimport unittest%0A%0A%0Aclass TestMetadataXml(unittest.TestCase):%0A    def get_metadata_xml(self):%0A        xml = metadata_xml()%0A        xml.upstream_name = %22Someone Important%22%0A        xml.upstream_email = %22someone@example.com%22%0A        xml.upstream_bug_url = %22https://bugzilla.someone.com%22%0A        xml.maintainer_type = %22person%22%0A        xml.longdescription = %22A ROS node that does cool stuff%22%0A        return xml.get_metadata_text()%0A%0A    def test_metadata_format(self):%0A        %22%22%22Test for parsing%22%22%22%0A        doc = xmltodict.parse(self.get_metadata_xml())%0A        metadata = doc%5B'pkgmetadata'%5D%0A        self.assertEqual(metadata%5B'longdescription'%5D, 'A ROS node that does cool stuff')%0A        who = metadata%5B'upstream'%5D%5B'maintainer'%5D%0A        self.assertEqual(who%5B'email'%5D, 'someone@example.com')%0A        self.assertEqual(who%5B'name'%5D, 'Someone Important')%0A        self.assertEqual(metadata%5B'upstream'%5D%5B'bugs-to'%5D, 'https://bugzilla.someone.com')%0A

Add metadata.xml tests. (#112)