0001-trivial-remove-unused-imports-39425.patch
combo/manager/views.py | ||
---|---|---|
11 | 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 |
# GNU Affero General Public License for more details. |
13 | 13 |
# |
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 | 17 |
import hashlib |
18 | 18 |
import json |
19 |
import os |
|
20 | 19 | |
21 | 20 |
from django.conf import settings |
22 | 21 |
from django.contrib import messages |
23 |
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
|
|
22 |
from django.core.exceptions import ObjectDoesNotExist |
|
24 | 23 |
from django.core.urlresolvers import reverse, reverse_lazy |
25 | 24 |
from django.http import HttpResponse, HttpResponseRedirect, Http404 |
26 | 25 |
from django.shortcuts import redirect |
27 | 26 |
from django.shortcuts import get_object_or_404 |
28 | 27 |
from django.utils.translation import ugettext_lazy as _ |
29 | 28 |
from django.utils.encoding import force_text, force_bytes |
30 | 29 |
from django.utils.formats import date_format |
31 | 30 |
from django.utils.timezone import localtime |
tests/test_import_export.py | ||
---|---|---|
1 | 1 |
import base64 |
2 |
import datetime |
|
3 | 2 |
import json |
4 | 3 |
import os |
5 | 4 |
import shutil |
6 | 5 |
import sys |
7 | 6 |
import tempfile |
8 | 7 | |
9 | 8 |
import pytest |
10 | 9 |
from django.contrib.auth.models import Group |
... | ... | |
14 | 13 |
from django.utils.encoding import force_bytes, force_text |
15 | 14 |
from django.utils.six import BytesIO, StringIO |
16 | 15 | |
17 | 16 |
from combo.apps.assets.models import Asset |
18 | 17 |
from combo.apps.gallery.models import Image, GalleryCell |
19 | 18 |
from combo.apps.maps.models import MapLayer, Map |
20 | 19 |
from combo.apps.pwa.models import PwaSettings, PwaNavigationEntry |
21 | 20 |
from combo.data.models import Page, TextCell |
22 |
from combo.data.utils import export_site, import_site, MissingGroups
|
|
21 |
from combo.data.utils import import_site, MissingGroups |
|
23 | 22 | |
24 | 23 |
pytestmark = pytest.mark.django_db |
25 | 24 | |
26 | 25 | |
27 | 26 |
@pytest.fixture |
28 | 27 |
def some_data(): |
29 | 28 |
page = Page(title='One', slug='one') |
30 | 29 |
page.save() |
tests/test_manager.py | ||
---|---|---|
1 | 1 |
import base64 |
2 |
import json |
|
3 | 2 |
import os |
4 | 3 |
import re |
5 | 4 |
import shutil |
6 | 5 | |
7 | 6 |
import mock |
8 | 7 | |
9 | 8 |
from django.core.files.storage import default_storage |
10 | 9 |
from django.core.urlresolvers import reverse |
11 | 10 |
from django.conf import settings |
12 |
from django.contrib.auth.models import User, Group
|
|
11 |
from django.contrib.auth.models import Group |
|
13 | 12 |
from django.template import TemplateSyntaxError |
14 | 13 |
from django.test import override_settings |
15 | 14 |
from django.utils.http import urlencode |
16 | 15 |
from django.utils.six import BytesIO |
17 | 16 |
from django.utils.six.moves.urllib import parse as urlparse |
18 | 17 | |
19 | 18 |
import pytest |
20 |
from webtest import TestApp |
|
21 | 19 |
from webtest import Upload |
22 | 20 | |
23 |
from combo.wsgi import application |
|
24 | 21 |
from combo.data.models import Page, CellBase, TextCell, LinkCell, ConfigJsonCell, JsonCell, PageSnapshot, LinkListCell, ParentContentCell |
25 | 22 |
from combo.apps.assets.models import Asset |
26 | 23 |
from combo.apps.family.models import FamilyInfosCell |
27 | 24 |
from combo.apps.search.models import SearchCell |
28 | 25 | |
29 | 26 |
pytestmark = pytest.mark.django_db |
30 | 27 | |
31 | 28 |
TESTS_DATA_DIR = os.path.join(os.path.dirname(__file__), 'data') |
32 |
- |