mirror of https://github.com/zulip/zulip.git
import: Add gitter import file in zerver/data_import directory.
This commit is contained in:
parent
b8e1e8b31d
commit
ee37866687
|
@ -72,7 +72,6 @@ not_yet_fully_covered = {
|
|||
'zerver/lib/export.py',
|
||||
'zerver/lib/feedback.py',
|
||||
'zerver/lib/fix_unreads.py',
|
||||
'zerver/lib/gitter_import.py',
|
||||
'zerver/lib/html_diff.py',
|
||||
'zerver/lib/import_realm.py',
|
||||
'zerver/lib/logging_util.py',
|
||||
|
@ -98,6 +97,7 @@ not_yet_fully_covered = {
|
|||
'zerver/lib/widget.py',
|
||||
# Data import files
|
||||
'zerver/data_import/slack.py',
|
||||
'zerver/data_import/gitter.py',
|
||||
# Webhook integrations with incomplete coverage
|
||||
'zerver/webhooks/beanstalk/view.py',
|
||||
'zerver/webhooks/bitbucket2/view.py',
|
||||
|
|
|
@ -8,7 +8,7 @@ from typing import Any
|
|||
|
||||
from django.core.management.base import BaseCommand, CommandParser, CommandError
|
||||
|
||||
from zerver.lib.gitter_import import do_convert_data
|
||||
from zerver.data_import.gitter import do_convert_data
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = """Convert the Gitter data into Zulip data format."""
|
||||
|
|
|
@ -18,7 +18,7 @@ from zerver.models import (
|
|||
Realm,
|
||||
get_realm,
|
||||
)
|
||||
from zerver.lib.gitter_import import (
|
||||
from zerver.data_import.gitter import (
|
||||
do_convert_data,
|
||||
get_usermentions,
|
||||
)
|
||||
|
@ -42,7 +42,7 @@ class GitterImporter(ZulipTestCase):
|
|||
os.makedirs(output_dir, exist_ok=True)
|
||||
return output_dir
|
||||
|
||||
@mock.patch('zerver.lib.gitter_import.process_avatars', return_value=[])
|
||||
@mock.patch('zerver.data_import.gitter.process_avatars', return_value=[])
|
||||
def test_gitter_import_to_existing_database(self, mock_process_avatars: mock.Mock) -> None:
|
||||
output_dir = self._make_output_dir()
|
||||
gitter_file = os.path.join(os.path.dirname(__file__), 'fixtures/gitter_data.json')
|
||||
|
|
Loading…
Reference in New Issue