Skip to content

Commit

Permalink
Merge pull request #357 from aarranz/feature/remove-resetsearchindexe…
Browse files Browse the repository at this point in the history
…s-command

Remove resetsearchindexes command
  • Loading branch information
aarranz authored Oct 31, 2018
2 parents 886d367 + 5c4c205 commit 3f71627
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 69 deletions.
46 changes: 0 additions & 46 deletions src/wirecloud/commons/management/commands/resetsearchindexes.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/wirecloud/commons/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from wirecloud.commons.tests.admin_commands import BaseAdminCommandTestCase, ConvertCommandTestCase, StartprojectCommandTestCase
from wirecloud.commons.tests.basic_views import BasicViewTestCase
from wirecloud.commons.tests.commands import ResetSearchIndexesCommandTestCase, CreateOrganizationCommandTestCase
from wirecloud.commons.tests.commands import CreateOrganizationCommandTestCase
from wirecloud.commons.tests.search_indexes import QueryParserTestCase, SearchAPITestCase, GroupIndexTestCase, UserIndexTestCase
from wirecloud.commons.tests.template import TemplateUtilsTestCase
from wirecloud.commons.tests.utils import GeneralUtilsTestCase, HTMLCleanupTestCase, WGTTestCase, HTTPUtilsTestCase
Expand Down
22 changes: 0 additions & 22 deletions src/wirecloud/commons/tests/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# along with Wirecloud. If not, see <http://www.gnu.org/licenses/>.

import io
import os
import sys

from django.core.management import call_command
Expand All @@ -32,27 +31,6 @@
__test__ = False


class ResetSearchIndexesCommandTestCase(TestCase):

tags = ('wirecloud-commands', 'wirecloud-command-resetsearchindexes', 'wirecloud-noselenium')

@patch('wirecloud.commons.management.commands.resetsearchindexes.call_command')
def test_resetsearchindexes_command_basic_usage(self, call_command_mock):

try:
call_command('resetsearchindexes')
except SystemExit:
raise CommandError('')

call_command_mock.assert_called_with("rebuild_index", interactive=True)

@patch('wirecloud.commons.management.commands.resetsearchindexes.call_command')
def test_resetsearchindexes_command_indexes_argument(self, call_command_mock):

with self.assertRaises(CommandError):
call_command('resetsearchindexes', '--indexes', 'users')


@patch('wirecloud.commons.management.commands.createorganization.locale.getdefaultlocale', return_value=("en_US",))
class CreateOrganizationCommandTestCase(TestCase):

Expand Down

0 comments on commit 3f71627

Please sign in to comment.