@mock.patch('os.path.isfile')
def test_usage_true(self, mock_isfile):
    mock_isfile.return_value = True
    with mock.patch.object(self.copier, 'copy_bbcp') as mock_copy_bbcp:
        self.assertTrue(self.copier.check_usage(self.data))
        self.assertEqual(2, mock_copy_bbcp.call_count)
        mock_copy_bbcp.reset_mock()
        self.assertTrue(self.copier.check_usage(self.data))
        mock_copy_bbcp.assert_not_called()
@mock.patch('os.path.isfile')
def test_usage_true(self, mock_isfile):
    mock_isfile.return_value = True
    with mock.patch.object(self.copier, 'copy_bbcp') as mock_copy_bbcp:
        self.assertTrue(self.copier.check_usage(self.data))
        self.assertEqual(2, mock_copy_bbcp.call_count)
        mock_copy_bbcp.reset_mock()
        self.assertTrue(self.copier.check_usage(self.data))
        mock_copy_bbcp.assert_not_called()