Example #1
0
 def test_update_no_directory(self, call_mock):
     """ The git formula should re-clone a repo if the repo directory doesn't exist """
     call_mock.return_value = (0, 'git://github.com/toumorokoshi/sprinter.git')
     self.environment.run_feature('update', 'sync')
     call_mock.assert_any_call(
         CLONE_REPO.format(
             repo=vals['repoA'],
             dir=self.directory.install_directory('update')),
         output_log_level=logging.DEBUG)
Example #2
0
 def test_update_no_directory(self, call_mock):
     """ The git formula should re-clone a repo if the repo directory doesn't exist """
     call_mock.return_value = (0,
                               'git://github.com/toumorokoshi/sprinter.git')
     self.environment.run_feature('update', 'sync')
     call_mock.assert_any_call(
         CLONE_REPO.format(repo=vals['repoA'],
                           dir=self.directory.install_directory('update')),
         output_log_level=logging.DEBUG)
Example #3
0
 def test_simple_example(self, call_mock):
     """ The git formula should call a clone to a git repo """
     install_directory = self.directory.install_directory('simple_example')
     call_mock.return_value = (0, '')
     self.environment.run_feature('simple_example', 'sync')
     call_mock.assert_has_calls([
         call(CLONE_REPO.format(repo=vals['repoA'], dir=install_directory),
              output_log_level=logging.DEBUG)
     ])
Example #4
0
 def test_simple_example(self, call_mock):
     """ The git formula should call a clone to a git repo """
     install_directory = self.directory.install_directory('simple_example')
     call_mock.return_value = (0, '')
     self.environment.run_feature('simple_example', 'sync')
     call_mock.assert_has_calls([
         call(CLONE_REPO.format(
             repo=vals['repoA'],
             dir=install_directory
         ), output_log_level=logging.DEBUG)
     ])