~bzr/ubuntu/maverick/bzr-svn/bzr-ppa

« back to all changes in this revision

Viewing changes to tests/test_tree.py

  • Committer: Jelmer Vernooij
  • Date: 2008-05-11 19:29:26 UTC
  • mfrom: (220.36.144 0.4)
  • Revision ID: jelmer@samba.org-20080511192926-7mh02j45r25qmzkz
Merge 0.4 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
5
 
# the Free Software Foundation; either version 2 of the License, or
 
5
# the Free Software Foundation; either version 3 of the License, or
6
6
# (at your option) any later version.
7
7
 
8
8
# This program is distributed in the hope that it will be useful,
98
98
 
99
99
 
100
100
class TestExternalsParser(TestCase):
 
101
    def test_parse_root_relative_externals(self):
 
102
        self.assertRaises(NotImplementedError, parse_externals_description, 
 
103
                    "http://example.com", "third-party/skins              ^/foo")
 
104
 
 
105
    def test_parse_scheme_relative_externals(self):
 
106
        self.assertRaises(NotImplementedError, parse_externals_description, 
 
107
                    "http://example.com", "third-party/skins              //foo")
 
108
 
101
109
    def test_parse_externals(self):
102
110
        self.assertEqual({
103
111
            'third-party/sounds': (None, "http://sounds.red-bean.com/repos"),
126
134
            parse_externals_description("http://example.com/trunk",
127
135
"third-party/sounds             ../branches/other"))
128
136
 
 
137
    def test_parse_repos_root_relative(self):
 
138
        self.assertEqual({
 
139
            'third-party/sounds': (None, "http://example.com/bar/bla/branches/other"),
 
140
                },
 
141
            parse_externals_description("http://example.com/trunk",
 
142
"third-party/sounds             /bar/bla/branches/other"))
 
143
 
129
144
    def test_parse_invalid_missing_url(self):
130
145
        """No URL specified."""
131
146
        self.assertRaises(errors.InvalidExternalsDescription,