Пример #1
0
 def test_entry(
     self,
     mock_walk,
     mock_isfile,
     mock_process,
     mock_get_counter,
     mock_package,
     mock_sign,
     mock_hash_file,
     mock_upload,
     mock_update_dns,
         mock_create_file):
     config = dict(
         domain_key=mock.sentinel.domain_key,
         remote_loc=mock.sentinel.remote_loc,
         gpg_keyid=mock.sentinel.gpg_keyid,
     )
     mock_walk.return_value = [
         (R_PATH, (), CF_FILES)
     ]
     mock_isfile.return_value = True
     mock_process.return_value = True
     mock_get_counter.return_value = 1
     entry(config)
     self.assertTrue(mock_walk.called)
     self.assertTrue(mock_isfile.called)
     self.assertTrue(mock_process.called)
     self.assertTrue(mock_get_counter.called)
     self.assertTrue(mock_package.called)
     self.assertTrue(mock_sign.called)
     self.assertTrue(mock_hash_file.called)
     self.assertTrue(mock_upload.called)
     self.assertTrue(mock_update_dns.called)
     self.assertTrue(mock_create_file.called)
Пример #2
0
 def test_entry_cleanup(self, mock_cleanup):
     config = dict(
         domain_key=mock.sentinel.domain_key,
         remote_loc=mock.sentinel.remote_loc,
         gpg_keyid=mock.sentinel.gpg_keyid,
     )
     entry(config, True)
     self.assertTrue(mock_cleanup.called)
Пример #3
0
 def test_entry_cleanup(self, mock_cleanup):
     config = dict(
         domain_key=mock.sentinel.domain_key,
         remote_loc=mock.sentinel.remote_loc,
         gpg_keyid=mock.sentinel.gpg_keyid,
     )
     entry(config, True)
     self.assertTrue(mock_cleanup.called)
Пример #4
0
 def test_entry(self, mock_walk, mock_isfile, mock_process,
                mock_get_counter, mock_package, mock_sign, mock_hash_file,
                mock_upload, mock_update_dns, mock_create_file):
     config = dict(
         domain_key=mock.sentinel.domain_key,
         remote_loc=mock.sentinel.remote_loc,
         gpg_keyid=mock.sentinel.gpg_keyid,
     )
     mock_walk.return_value = [(R_PATH, (), CF_FILES)]
     mock_isfile.return_value = True
     mock_process.return_value = True
     mock_get_counter.return_value = 1
     entry(config)
     self.assertTrue(mock_walk.called)
     self.assertTrue(mock_isfile.called)
     self.assertTrue(mock_process.called)
     self.assertTrue(mock_get_counter.called)
     self.assertTrue(mock_package.called)
     self.assertTrue(mock_sign.called)
     self.assertTrue(mock_hash_file.called)
     self.assertTrue(mock_upload.called)
     self.assertTrue(mock_update_dns.called)
     self.assertTrue(mock_create_file.called)