Esempio n. 1
0
 def test_queue_files_none(self, mock_walk):
     mock_queue = mock.Mock(spec=Queue)
     mock_walk.return_value = [
         (A_PATH, (), ())
     ]
     queue_files(A_PATH, mock_queue)
     mock_walk.assert_called_once_with(A_PATH)
Esempio n. 2
0
 def test_queue_files(self, mock_walk):
     mock_queue = mock.Mock(spec=Queue)
     mock_walk.return_value = [(A_PATH, (), A_FILES)]
     expected_calls = [
         mock.call('%s/%s' % (A_PATH, filename)) for filename in A_FILES
     ]
     queue_files(A_PATH, mock_queue)
     mock_walk.assert_called_once_with(A_PATH)
     self.assertTrue(mock_queue.put.called)
     self.assertEqual(expected_calls, mock_queue.put.call_args_list)
Esempio n. 3
0
 def test_queue_files(self, mock_walk):
     mock_queue = mock.Mock(spec=Queue)
     mock_walk.return_value = [
         (A_PATH, (), A_FILES)
     ]
     expected_calls = [
         mock.call('%s/%s' % (A_PATH, filename)) for filename in A_FILES
     ]
     queue_files(A_PATH, mock_queue)
     mock_walk.assert_called_once_with(A_PATH)
     self.assertTrue(mock_queue.put.called)
     self.assertEqual(expected_calls, mock_queue.put.call_args_list)
Esempio n. 4
0
 def test_queue_files_none(self, mock_walk):
     mock_queue = mock.Mock(spec=Queue)
     mock_walk.return_value = [(A_PATH, (), ())]
     queue_files(A_PATH, mock_queue)
     mock_walk.assert_called_once_with(A_PATH)