示例#1
0
    def test_parse_externals_swapped(self):
        self.assertEqual(
            {'third-party/sounds': (None, "http://sounds.red-bean.com/repos")},
            properties.parse_externals_description(
                "http://example.com", """\
http://sounds.red-bean.com/repos         third-party/sounds
"""))
示例#2
0
    def test_parse_externals(self):
        self.assertEqual({
            'third-party/sounds': (None, "http://sounds.red-bean.com/repos"),
            'third-party/skins': (None, "http://skins.red-bean.com/repositories/skinproj"),
            'third-party/skins/toolkit': (21, "http://svn.red-bean.com/repos/skin-maker")},
            properties.parse_externals_description("http://example.com",
"""third-party/sounds             http://sounds.red-bean.com/repos
third-party/skins              http://skins.red-bean.com/repositories/skinproj
third-party/skins/toolkit -r21 http://svn.red-bean.com/repos/skin-maker"""))
示例#3
0
    def test_parse_externals_space_revno(self):
        self.assertEqual(
            {
                'third-party/skins/toolkit':
                (21, "http://svn.red-bean.com/repos/skin-maker")
            },
            properties.parse_externals_description(
                "http://example.com", """\
third-party/skins/toolkit -r 21 http://svn.red-bean.com/repos/skin-maker"""))
示例#4
0
 def test_parse_repos_root_relative(self):
     self.assertEqual(
         {
             'third-party/sounds':
             (None, "http://example.com/bar/bla/branches/other"),
         },
         properties.parse_externals_description(
             "http://example.com/trunk",
             "third-party/sounds             /bar/bla/branches/other"))
示例#5
0
    def test_parse_comment(self):
        self.assertEqual(
            {'third-party/sounds': (None, "http://sounds.red-bean.com/repos")},
            properties.parse_externals_description(
                "http://example.com/", """\

third-party/sounds             http://sounds.red-bean.com/repos
#third-party/skins              http://skins.red-bean.com/repositories/skinproj
#third-party/skins/toolkit -r21 http://svn.red-bean.com/repos/skin-maker"""))
示例#6
0
    def test_parse_relative(self):
        self.assertEqual({
            'third-party/sounds': (None, "http://example.com/branches/other"),
                },
            properties.parse_externals_description("http://example.com/trunk",
"third-party/sounds             ../branches/other"))
示例#7
0
    def test_parse_externals_swapped(self):
        self.assertEqual({'third-party/sounds': (None, "http://sounds.red-bean.com/repos")},
            properties.parse_externals_description("http://example.com",
"""http://sounds.red-bean.com/repos         third-party/sounds
"""))
示例#8
0
    def test_parse_externals_space_revno(self):
        self.assertEqual({
            'third-party/skins/toolkit': (21, "http://svn.red-bean.com/repos/skin-maker")},
            properties.parse_externals_description("http://example.com",
"""third-party/skins/toolkit -r 21 http://svn.red-bean.com/repos/skin-maker"""))
示例#9
0
 def test_parse_invalid_too_much_data(self):
     """No URL specified."""
     self.assertRaises(properties.InvalidExternalsDescription, 
         lambda: properties.parse_externals_description(None, "bla -R40 http://bla/"))
示例#10
0
 def test_parse_invalid_missing_url(self):
     """No URL specified."""
     self.assertRaises(properties.InvalidExternalsDescription, 
         lambda: properties.parse_externals_description("http://example.com/", "bla"))
示例#11
0
 def test_parse_invalid_too_much_data(self):
     """No URL specified."""
     self.assertRaises(
         properties.InvalidExternalsDescription,
         lambda: properties.parse_externals_description(
             None, "bla -R40 http://bla/"))
示例#12
0
 def test_parse_invalid_missing_url(self):
     """No URL specified."""
     self.assertRaises(
         properties.InvalidExternalsDescription,
         lambda: properties.parse_externals_description(
             "http://example.com/", "bla"))