221
221
self.assertEqual(expected, request.execute('', 'False'))
224
class TestSmartServerBzrDirRequestHasWorkingTree(
225
tests.TestCaseWithTransport):
226
"""Tests for BzrDir.has_workingtree."""
228
def test_has_workingtree_yes(self):
229
"""A working tree is present."""
230
backing = self.get_transport()
231
dir = self.make_branch_and_tree('.').bzrdir
232
request_class = smart_dir.SmartServerBzrDirRequestHasWorkingTree
233
request = request_class(backing)
234
expected = smart_req.SuccessfulSmartServerResponse(('yes',))
235
self.assertEqual(expected, request.execute(''))
237
def test_has_workingtree_no(self):
238
"""A working tree is missing."""
239
backing = self.get_transport()
240
dir = self.make_bzrdir('.')
241
request_class = smart_dir.SmartServerBzrDirRequestHasWorkingTree
242
request = request_class(backing)
243
expected = smart_req.SuccessfulSmartServerResponse(('no',))
244
self.assertEqual(expected, request.execute(''))
224
247
class TestSmartServerRequestCreateRepository(tests.TestCaseWithMemoryTransport):
225
248
"""Tests for BzrDir.create_repository."""