Merge the 0.3 branch.
[jelmer/subvertpy.git] / tests / test_radir.py
index 2bfddbd757bd720db309e5cf154113d781a5ebda..7a668022060c9a7d28ba8b6ddb4e89c932b3418c 100644 (file)
@@ -15,7 +15,8 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 from bzrlib.bzrdir import BzrDir
-from bzrlib.errors import NoRepositoryPresent, NotBranchError, NotLocalUrl
+from bzrlib.errors import (NoRepositoryPresent, NotBranchError, NotLocalUrl,
+                           NoWorkingTree)
 
 from tests import TestCaseWithSubversionRepository
 
@@ -31,7 +32,12 @@ class TestRemoteAccess(TestCaseWithSubversionRepository):
     def test_open_workingtree(self):
         repos_url = self.make_client("d", "dc")
         x = BzrDir.open(repos_url)
-        self.assertRaises(NotLocalUrl, x.open_workingtree)
+        self.assertRaises(NoWorkingTree, x.open_workingtree)
+
+    def test_open_workingtree_recommend_arg(self):
+        repos_url = self.make_client("d", "dc")
+        x = BzrDir.open(repos_url)
+        self.assertRaises(NoWorkingTree, lambda: x.open_workingtree(recommend_upgrade=True))
 
     def test_create_workingtree(self):
         repos_url = self.make_client("d", "dc")