@@ -0,0 +1,1081 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0Aimport unittest%0A%0Aimport os, sys%0Asys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))%0A%0Afrom DebianChangesBot.mailparsers import BugSubmittedParser as p%0A%0Aclass TestMailParserBugSubmitted(unittest.TestCase):%0A%0A    def setUp(self):%0A        self.headers = %7B%0A            'Subject': 'Bug#123456: Bug title',%0A            'From': 'Submitter Name %3Cname@host.tld%3E',%0A        %7D%0A%0A        self.body = %5B%0A            %22Package: package-name%22,%0A            %22Version: version-here%22,%0A            %22%22,%0A            %22Description%22%0A        %5D%0A%0A    def testSimple(self):%0A        msg = p.parse(self.headers, self.body)%0A%0A        self.assert_(msg)%0A        self.assertEqual(msg.package, 'package-name')%0A        self.assertEqual(msg.version, 'version-here')%0A        self.assertEqual(msg.by, 'Submitter Name %3Cname@host.tld%3E')%0A%0A    def testVersionWithSpaces(self):%0A        self.body%5B1%5D = %22Version: version with spaces%22%0A        msg = p.parse(self.headers, self.body)%0A%0A        self.failIf(msg.version)%0A%0Aif __name__ == %22__main__%22:%0A    unittest.main()%0A

Add some simple tests for bug_submitted