예제 #1
0
 def testMembersChanged(self):
   members = [
     'GenerateDiff', 'GetFileNames', 'GetLocalRoot', 'ProcessOptions',
     'options'
   ]
   # If this test fails, you should add the relevant test.
   self.compareMembers(trychange.SVN(None), members)
예제 #2
0
 def setUp(self):
   SuperMoxTestBase.setUp(self)
   self.fake_root = '/fake_root'
   self.expected_files = ['foo.txt', 'bar.txt']
   change_info = trychange.gcl.ChangeInfo(
       'test_change', 0, 0, 'desc',
       [('M', f) for f in self.expected_files],
       self.fake_root)
   self.svn = trychange.SVN(None)
   self.svn.change_info = change_info
예제 #3
0
 def testBasic(self):
   trychange.scm.SVN.GetCheckoutRoot(self.fake_root).AndReturn(self.fake_root)
   trychange.scm.SVN.GenerateDiff(['foo.txt', 'bar.txt'],
                                  self.fake_root,
                                  full_move=True,
                                  revision=None).AndReturn('A diff')
   trychange.scm.SVN.GetEmail(self.fake_root).AndReturn('*****@*****.**')
   self.mox.ReplayAll()
   svn = trychange.SVN(self.options, self.fake_root)
   self.assertEqual(svn.GetFileNames(), self.expected_files)
   self.assertEqual(svn.checkout_root, self.fake_root)
   self.assertEqual(svn.GenerateDiff(), 'A diff')