예제 #1
0
 def test_list(self):
     """
     Checking list
     :return:
     """
     actual_answer = CommonClient(self.test_svn_url, 'url').list()
     self.assertEqual(actual_answer.next(), 'abdera/')
예제 #2
0
 def test_log(self):
     """
     Checking log
     :return:
     """
     actual_answer = CommonClient(self.test_svn_url,
                                  'url').log_default(revision_from=1761404,
                                                     revision_to=1761403)
     self.assertEqual(actual_answer.next().author, 'sseifert')
예제 #3
0
 def test_cat(self):
     """
     Checking cat
     :return:
     """
     actual_answer = CommonClient(self.test_svn_url,
                                  'url').cat('abdera/abdera2/README',
                                             revision=1761404)
     self.assertEqual(cat, actual_answer.decode())
예제 #4
0
 def test_diff(self):
     """
     Checking diff
     :return:
     """
     actual_answer = CommonClient(self.test_svn_url,
                                  'url').diff(self.test_start_revision,
                                              self.test_end_revision)
     for index, individual_diff in enumerate(actual_answer):
         for diff_key in individual_diff:
             if diff_key == 'diff':
                 self.assertTrue(
                     'sling/trunk/bundles/extensions/models/pom.xml'
                     in individual_diff[diff_key]
                     or 'sling/trunk/pom.xml' in individual_diff[diff_key])
                 self.assertTrue(
                     '<module>bundles/extensions/models</module>'
                     in individual_diff[diff_key]
                     or '<description>Apache Sling Models</description>'
                     in individual_diff[diff_key])
             elif diff_key == 'path':
                 self.assertTrue(
                     'http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/pom.xml'
                     in individual_diff[diff_key] or
                     'http://svn.apache.org/repos/asf/sling/trunk/pom.xml'
                     in individual_diff[diff_key])
예제 #5
0
 def test_error_client_formation(self):
     """
     Testing SvnException error while client formation
     :return:
     """
     with self.assertRaises(SvnException):
         CommonClient(self.test_svn_url, 'random')
예제 #6
0
파일: test_common.py 프로젝트: rnt/PySvn
 def test_error_client_formation(self):
     """
     Testing Value error while client formation
     :return:
     """
     with self.assertRaises(ValueError):
         CommonClient(self.test_svn_url, 'random')
예제 #7
0
 def test_export(self):
     """
     Checking export
     :return:
     """
     CommonClient('http://svn.apache.org/repos/asf/tcl/websh/trunk/',
                  'url').export(to_path='CHANGES', revision=1761404)
     self.assertTrue(os.path.exists('CHANGES'))
예제 #8
0
파일: test_common.py 프로젝트: rnt/PySvn
 def test_diff_summary(self):
     """
     Checking diff summary
     :return:
     """
     actual_answer = CommonClient(self.test_svn_url, 'url').diff_summary(self.test_start_revision,
                                                                         self.test_end_revision)
     self.assertEqual(actual_answer, diff_summary)
예제 #9
0
 def test_force_export(self):
     """
     Checking export with force option
     :return:
     """
     CommonClient('http://svn.apache.org/repos/asf/tcl/websh/trunk/',
                  'url').export(to_path='CHANGES', revision=1761404)
     self.assertTrue(os.path.exists('CHANGES'))
     with self.assertRaises(SvnException):
         CommonClient('http://svn.apache.org/repos/asf/tcl/websh/trunk/',
                      'url').export(to_path='CHANGES', revision=1761404)
     try:
         CommonClient('http://svn.apache.org/repos/asf/tcl/websh/trunk/',
                      'url').export(to_path='CHANGES',
                                    revision=1761404,
                                    force=True)
     except SvnException:
         self.fail("Svn Exception raised with Force also")
예제 #10
0
 def test_info(self):
     """
     Checking info
     :return:
     """
     actual_answer = CommonClient(self.test_svn_url, 'url').info()
     self.assertEqual(actual_answer['entry_path'], 'asf')
     self.assertEqual(actual_answer['repository_root'],
                      'http://svn.apache.org/repos/asf')
     self.assertEqual(actual_answer['entry#kind'], 'dir')
     self.assertEqual(actual_answer['repository/uuid'],
                      '13f79535-47bb-0310-9956-ffa450edef68')