@@ -17,9 +17,11 @@
Loading
17 17
18 18
19 19
class MyTestPage(Page):
20 -
    body = StreamField([
21 -
        ('char_array', blocks.ListBlock(blocks.CharBlock())),
22 -
        ('int_array', blocks.ListBlock(blocks.IntegerBlock())),
23 -
        ('struct', MyBlock()),
24 -
        ('image', ImageChooserBlock()),
25 -
    ])
20 +
    body = StreamField(
21 +
        [
22 +
            ("char_array", blocks.ListBlock(blocks.CharBlock())),
23 +
            ("int_array", blocks.ListBlock(blocks.IntegerBlock())),
24 +
            ("struct", MyBlock()),
25 +
            ("image", ImageChooserBlock()),
26 +
        ]
27 +
    )

@@ -5,102 +5,99 @@
Loading
5 5
MIDDLEWARE_CLASSES = []
6 6
7 7
CACHES = {
8 -
    'default': {
9 -
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
10 -
        'LOCATION': 'unique-snowflake',
8 +
    "default": {
9 +
        "BACKEND": "django.core.cache.backends.locmem.LocMemCache",
10 +
        "LOCATION": "unique-snowflake",
11 11
    }
12 12
}
13 13
14 -
ROOT_URLCONF = 'tests.urls'
14 +
ROOT_URLCONF = "tests.urls"
15 15
16 -
SECRET_KEY = 'Gx8sMKAtnA69TR9lyAlLuSnozUv3kxdscHkpwEjatZRVQQ0laMY69KL4XPxvr3KY'
16 +
SECRET_KEY = "Gx8sMKAtnA69TR9lyAlLuSnozUv3kxdscHkpwEjatZRVQQ0laMY69KL4XPxvr3KY"
17 17
18 18
DATABASES = {
19 -
    'default': {
20 -
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
21 -
        'NAME': os.environ.get('TEST_DB_NAME', 'wagtail_factories'),
22 -
        'USER': os.environ.get('TEST_DB_USER', None),
23 -
        'HOST': os.environ.get('TEST_DB_HOST', 'localhost'),
24 -
        'PORT': os.environ.get('TEST_DB_PORT', '5432'),
25 -
    },
19 +
    "default": {
20 +
        "ENGINE": "django.db.backends.postgresql_psycopg2",
21 +
        "NAME": os.environ.get("TEST_DB_NAME", "wagtail_factories"),
22 +
        "USER": os.environ.get("TEST_DB_USER", None),
23 +
        "HOST": os.environ.get("TEST_DB_HOST", "localhost"),
24 +
        "PORT": os.environ.get("TEST_DB_PORT", "5432"),
25 +
    }
26 26
}
27 27
28 28
INSTALLED_APPS = [
29 -
    'taggit',
30 -
    'rest_framework',
31 -
32 -
    'django.contrib.admin',
33 -
    'django.contrib.auth',
34 -
    'django.contrib.contenttypes',
35 -
    'django.contrib.messages',
36 -
    'django.contrib.sessions',
37 -
    'django.contrib.sites',
38 -
    'django.contrib.staticfiles',
39 -
40 -
    'tests.testapp',
29 +
    "taggit",
30 +
    "rest_framework",
31 +
    "django.contrib.admin",
32 +
    "django.contrib.auth",
33 +
    "django.contrib.contenttypes",
34 +
    "django.contrib.messages",
35 +
    "django.contrib.sessions",
36 +
    "django.contrib.sites",
37 +
    "django.contrib.staticfiles",
38 +
    "tests.testapp",
41 39
]
42 40
43 41
44 42
if WAGTAIL_VERSION < (2, 0):
45 43
    INSTALLED_APPS = [
46 -
        'wagtail.contrib.wagtailstyleguide',
47 -
        'wagtail.contrib.wagtailsitemaps',
48 -
        'wagtail.contrib.wagtailroutablepage',
49 -
        'wagtail.contrib.wagtailfrontendcache',
50 -
        'wagtail.contrib.wagtailapi',
51 -
        'wagtail.contrib.wagtailsearchpromotions',
52 -
        'wagtail.contrib.settings',
53 -
        'wagtail.contrib.modeladmin',
54 -
        'wagtail.contrib.table_block',
55 -
        'wagtail.wagtailforms',
56 -
        'wagtail.wagtailsearch',
57 -
        'wagtail.wagtailembeds',
58 -
        'wagtail.wagtailimages',
59 -
        'wagtail.wagtailsites',
60 -
        'wagtail.wagtailusers',
61 -
        'wagtail.wagtailsnippets',
62 -
        'wagtail.wagtaildocs',
63 -
        'wagtail.wagtailadmin',
64 -
        'wagtail.api.v2',
65 -
        'wagtail.wagtailcore',
44 +
        "wagtail.contrib.wagtailstyleguide",
45 +
        "wagtail.contrib.wagtailsitemaps",
46 +
        "wagtail.contrib.wagtailroutablepage",
47 +
        "wagtail.contrib.wagtailfrontendcache",
48 +
        "wagtail.contrib.wagtailapi",
49 +
        "wagtail.contrib.wagtailsearchpromotions",
50 +
        "wagtail.contrib.settings",
51 +
        "wagtail.contrib.modeladmin",
52 +
        "wagtail.contrib.table_block",
53 +
        "wagtail.wagtailforms",
54 +
        "wagtail.wagtailsearch",
55 +
        "wagtail.wagtailembeds",
56 +
        "wagtail.wagtailimages",
57 +
        "wagtail.wagtailsites",
58 +
        "wagtail.wagtailusers",
59 +
        "wagtail.wagtailsnippets",
60 +
        "wagtail.wagtaildocs",
61 +
        "wagtail.wagtailadmin",
62 +
        "wagtail.api.v2",
63 +
        "wagtail.wagtailcore",
66 64
    ] + INSTALLED_APPS
67 65
else:
68 66
    INSTALLED_APPS = [
69 -
        'wagtail.contrib.styleguide',
70 -
        'wagtail.contrib.sitemaps',
71 -
        'wagtail.contrib.routable_page',
72 -
        'wagtail.contrib.frontend_cache',
73 -
        'wagtail.contrib.search_promotions',
74 -
        'wagtail.contrib.settings',
75 -
        'wagtail.contrib.modeladmin',
76 -
        'wagtail.contrib.table_block',
77 -
        'wagtail.contrib.forms',
78 -
79 -
        'wagtail.search',
80 -
        'wagtail.embeds',
81 -
        'wagtail.images',
82 -
        'wagtail.sites',
83 -
        'wagtail.users',
84 -
        'wagtail.snippets',
85 -
        'wagtail.documents',
86 -
        'wagtail.admin',
87 -
        'wagtail.api.v2',
88 -
        'wagtail.core',
67 +
        "wagtail.contrib.styleguide",
68 +
        "wagtail.contrib.sitemaps",
69 +
        "wagtail.contrib.routable_page",
70 +
        "wagtail.contrib.frontend_cache",
71 +
        "wagtail.contrib.search_promotions",
72 +
        "wagtail.contrib.settings",
73 +
        "wagtail.contrib.modeladmin",
74 +
        "wagtail.contrib.table_block",
75 +
        "wagtail.contrib.forms",
76 +
        "wagtail.search",
77 +
        "wagtail.embeds",
78 +
        "wagtail.images",
79 +
        "wagtail.sites",
80 +
        "wagtail.users",
81 +
        "wagtail.snippets",
82 +
        "wagtail.documents",
83 +
        "wagtail.admin",
84 +
        "wagtail.api.v2",
85 +
        "wagtail.core",
89 86
    ] + INSTALLED_APPS
90 87
91 88
92 89
TEMPLATES = [
93 90
    {
94 -
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
95 -
        'DIRS': [],
96 -
        'APP_DIRS': True,
97 -
        'OPTIONS': {
98 -
            'context_processors': [
99 -
                'django.template.context_processors.debug',
100 -
                'django.template.context_processors.request',
101 -
                'django.contrib.auth.context_processors.auth',
102 -
                'django.contrib.messages.context_processors.messages',
103 -
            ],
91 +
        "BACKEND": "django.template.backends.django.DjangoTemplates",
92 +
        "DIRS": [],
93 +
        "APP_DIRS": True,
94 +
        "OPTIONS": {
95 +
            "context_processors": [
96 +
                "django.template.context_processors.debug",
97 +
                "django.template.context_processors.request",
98 +
                "django.contrib.auth.context_processors.auth",
99 +
                "django.contrib.messages.context_processors.messages",
100 +
            ]
104 101
        },
105 -
    },
102 +
    }
106 103
]

@@ -15,20 +15,31 @@
Loading
15 15
16 16
    initial = True
17 17
18 -
    dependencies = [
19 -
        ('wagtailcore', '0030_index_on_pagerevision_created_at'),
20 -
    ]
18 +
    dependencies = [("wagtailcore", "0030_index_on_pagerevision_created_at")]
21 19
22 20
    operations = [
23 21
        migrations.CreateModel(
24 -
            name='MyTestPage',
22 +
            name="MyTestPage",
25 23
            fields=[
26 -
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
27 -
                ('body', fields.StreamField((('char_array', blocks.ListBlock(blocks.CharBlock())),))),
24 +
                (
25 +
                    "page_ptr",
26 +
                    models.OneToOneField(
27 +
                        auto_created=True,
28 +
                        on_delete=django.db.models.deletion.CASCADE,
29 +
                        parent_link=True,
30 +
                        primary_key=True,
31 +
                        serialize=False,
32 +
                        to="wagtailcore.Page",
33 +
                    ),
34 +
                ),
35 +
                (
36 +
                    "body",
37 +
                    fields.StreamField(
38 +
                        (("char_array", blocks.ListBlock(blocks.CharBlock())),)
39 +
                    ),
40 +
                ),
28 41
            ],
29 -
            options={
30 -
                'abstract': False,
31 -
            },
32 -
            bases=('wagtailcore.page',),
33 -
        ),
42 +
            options={"abstract": False},
43 +
            bases=("wagtailcore.page",),
44 +
        )
34 45
    ]

@@ -11,83 +11,73 @@
Loading
11 11
@pytest.mark.django_db
12 12
def test_list_block_factory():
13 13
    value = MyBlockFactory(
14 -
        items__0__label='label-1',
14 +
        items__0__label="label-1",
15 15
        items__0__value=1,
16 -
        items__1__label='label-2',
16 +
        items__1__label="label-2",
17 17
        items__1__value=2,
18 -
        image__image=None)
19 -
20 -
    assert value == StructValue(None, [
21 -
        ('title', 'my title'),
22 -
        ('item', OrderedDict([
23 -
            ('label', 'my-label'),
24 -
            ('value', 100),
25 -
        ])),
26 -
        ('items', [
27 -
            StructValue(None, [
28 -
                ('label', 'label-1'),
29 -
                ('value', 1),
30 -
            ]),
31 -
            StructValue(None, [
32 -
                ('label', 'label-2'),
33 -
                ('value', 2),
34 -
            ]),
35 -
        ]),
36 -
        ('image', None),
37 -
    ])
18 +
        image__image=None,
19 +
    )
20 +
21 +
    assert value == StructValue(
22 +
        None,
23 +
        [
24 +
            ("title", "my title"),
25 +
            ("item", OrderedDict([("label", "my-label"), ("value", 100)])),
26 +
            (
27 +
                "items",
28 +
                [
29 +
                    StructValue(None, [("label", "label-1"), ("value", 1)]),
30 +
                    StructValue(None, [("label", "label-2"), ("value", 2)]),
31 +
                ],
32 +
            ),
33 +
            ("image", None),
34 +
        ],
35 +
    )
38 36
39 37
40 38
@pytest.mark.django_db
41 39
def test_block_factory():
42 -
    value = MyBlockFactory(
43 -
        image__image__title='blub')
44 -
45 -
    assert value == OrderedDict([
46 -
        ('title', 'my title'),
47 -
        ('item', OrderedDict([
48 -
            ('label', 'my-label'),
49 -
            ('value', 100),
50 -
        ])),
51 -
        ('items', []),
52 -
        ('image', Image.objects.first()),
53 -
    ])
40 +
    value = MyBlockFactory(image__image__title="blub")
41 +
42 +
    assert value == OrderedDict(
43 +
        [
44 +
            ("title", "my title"),
45 +
            ("item", OrderedDict([("label", "my-label"), ("value", 100)])),
46 +
            ("items", []),
47 +
            ("image", Image.objects.first()),
48 +
        ]
49 +
    )
54 50
55 -
    assert value['image'].title == 'blub'
51 +
    assert value["image"].title == "blub"
56 52
57 53
58 54
def test_block_factory_build():
59 -
    value = MyBlockFactory.build(
60 -
        image__image__title='blub')
55 +
    value = MyBlockFactory.build(image__image__title="blub")
61 56
62 -
    image = value.pop('image')
63 -
    assert image.title == 'blub'
57 +
    image = value.pop("image")
58 +
    assert image.title == "blub"
64 59
65 -
    assert value == OrderedDict([
66 -
        ('title', 'my title'),
67 -
        ('item', OrderedDict([
68 -
            ('label', 'my-label'),
69 -
            ('value', 100),
70 -
        ])),
71 -
        ('items', []),
72 -
    ])
60 +
    assert value == OrderedDict(
61 +
        [
62 +
            ("title", "my title"),
63 +
            ("item", OrderedDict([("label", "my-label"), ("value", 100)])),
64 +
            ("items", []),
65 +
        ]
66 +
    )
73 67
74 68
75 69
@pytest.mark.django_db
76 70
def test_block_factory_subkwarg():
77 -
    value = MyBlockFactory(
78 -
        item__label='my-label',
79 -
        item__value=20,
80 -
        image__image=None)
81 -
82 -
    assert value == OrderedDict([
83 -
        ('title', 'my title'),
84 -
        ('item', OrderedDict([
85 -
            ('label', 'my-label'),
86 -
            ('value', 20),
87 -
        ])),
88 -
        ('items', []),
89 -
        ('image', None),
90 -
    ])
71 +
    value = MyBlockFactory(item__label="my-label", item__value=20, image__image=None)
72 +
73 +
    assert value == OrderedDict(
74 +
        [
75 +
            ("title", "my title"),
76 +
            ("item", OrderedDict([("label", "my-label"), ("value", 20)])),
77 +
            ("items", []),
78 +
            ("image", None),
79 +
        ]
80 +
    )
91 81
92 82
93 83
@pytest.mark.django_db
@@ -97,33 +87,39 @@
Loading
97 87
    root_page = wagtail_factories.PageFactory(parent=None)
98 88
    page = MyTestPageWithStreamFieldFactory(
99 89
        parent=root_page,
100 -
        body__0__char_array__0='foo',
101 -
        body__0__char_array__1='bar',
90 +
        body__0__char_array__0="foo",
91 +
        body__0__char_array__1="bar",
102 92
        body__2__int_array__0=100,
103 -
        body__1__struct__title='My Title',
93 +
        body__1__struct__title="My Title",
104 94
        body__1__struct__item__value=100,
105 95
        body__1__struct__image__image=None,
106 -
        body__3__image__image__title='Blub',
96 +
        body__3__image__image__title="Blub",
107 97
    )
108 98
    assert Image.objects.count() == 1
109 99
    image = Image.objects.first()
110 100
111 101
    assert page.body.stream_data == [
112 -
        ('char_array', ['foo', 'bar']),
113 -
        ('struct', StructValue(None, [
114 -
            ('title', 'My Title'),
115 -
            ('item', StructValue(None, [
116 -
                ('label', 'my-label'),
117 -
                ('value', 100),
118 -
            ])),
119 -
            ('items', []),
120 -
            ('image', None),
121 -
        ])),
122 -
        ('int_array', [100]),
123 -
        ('image', image),
102 +
        ("char_array", ["foo", "bar"]),
103 +
        (
104 +
            "struct",
105 +
            StructValue(
106 +
                None,
107 +
                [
108 +
                    ("title", "My Title"),
109 +
                    (
110 +
                        "item",
111 +
                        StructValue(None, [("label", "my-label"), ("value", 100)]),
112 +
                    ),
113 +
                    ("items", []),
114 +
                    ("image", None),
115 +
                ],
116 +
            ),
117 +
        ),
118 +
        ("int_array", [100]),
119 +
        ("image", image),
124 120
    ]
125 121
    content = str(page.body)
126 -
    assert 'block-image' in content
122 +
    assert "block-image" in content
127 123
128 124
129 125
@pytest.mark.django_db

@@ -6,7 +6,7 @@
Loading
6 6
7 7
8 8
class MyBlockItemFactory(wagtail_factories.StructBlockFactory):
9 -
    label = 'my-label'
9 +
    label = "my-label"
10 10
    value = 100
11 11
12 12
    class Meta:
@@ -24,13 +24,11 @@
Loading
24 24
25 25
26 26
class MyTestPageFactory(wagtail_factories.PageFactory):
27 -
28 27
    class Meta:
29 28
        model = models.MyTestPage
30 29
31 30
32 31
class MyTestPageGetOrCreateFactory(wagtail_factories.PageFactory):
33 -
34 32
    class Meta:
35 33
        model = models.MyTestPage
36 34
        django_get_or_create = ["slug", "parent"]
@@ -38,14 +36,18 @@
Loading
38 36
39 37
class MyTestPageWithStreamFieldFactory(wagtail_factories.PageFactory):
40 38
41 -
    body = wagtail_factories.StreamFieldFactory({
42 -
        'char_array': wagtail_factories.ListBlockFactory(
43 -
            wagtail_factories.CharBlockFactory),
44 -
        'int_array': wagtail_factories.ListBlockFactory(
45 -
            wagtail_factories.IntegerBlockFactory),
46 -
        'struct': MyBlockFactory,
47 -
        'image': wagtail_factories.ImageChooserBlockFactory
48 -
    })
39 +
    body = wagtail_factories.StreamFieldFactory(
40 +
        {
41 +
            "char_array": wagtail_factories.ListBlockFactory(
42 +
                wagtail_factories.CharBlockFactory
43 +
            ),
44 +
            "int_array": wagtail_factories.ListBlockFactory(
45 +
                wagtail_factories.IntegerBlockFactory
46 +
            ),
47 +
            "struct": MyBlockFactory,
48 +
            "image": wagtail_factories.ImageChooserBlockFactory,
49 +
        }
50 +
    )
49 51
50 52
    class Meta:
51 53
        model = models.MyTestPage

@@ -8,22 +8,22 @@
Loading
8 8
@pytest.mark.django_db
9 9
def test_page_no_args_or_kwargs():
10 10
    page = wagtail_factories.PageFactory(parent=None)
11 -
    assert page.title == 'Test page'
12 -
    assert page.slug == 'test-page'
11 +
    assert page.title == "Test page"
12 +
    assert page.slug == "test-page"
13 13
14 14
15 15
@pytest.mark.django_db
16 16
def test_page_build_no_args_or_kwargs():
17 17
    page = wagtail_factories.PageFactory.build(parent=None)
18 -
    assert page.title == 'Test page'
19 -
    assert page.slug == 'test-page'
18 +
    assert page.title == "Test page"
19 +
    assert page.slug == "test-page"
20 20
21 21
22 22
@pytest.mark.django_db
23 23
def test_page_build_no_parent():
24 24
    page = wagtail_factories.PageFactory.build()
25 -
    assert page.title == 'Test page'
26 -
    assert page.slug == 'test-page'
25 +
    assert page.title == "Test page"
26 +
    assert page.slug == "test-page"
27 27
28 28
29 29
@pytest.mark.django_db
@@ -42,16 +42,16 @@
Loading
42 42
@pytest.mark.django_db
43 43
def test_page_multiple_nested():
44 44
    root = wagtail_factories.PageFactory(parent=None)
45 -
    page_1 = wagtail_factories.PageFactory(parent=root, slug='page-1')
46 -
    wagtail_factories.PageFactory(parent=page_1, slug='page-1-1')
47 -
    wagtail_factories.PageFactory(parent=page_1, slug='page-1-2')
48 -
    wagtail_factories.PageFactory(parent=page_1, slug='page-1-3')
45 +
    page_1 = wagtail_factories.PageFactory(parent=root, slug="page-1")
46 +
    wagtail_factories.PageFactory(parent=page_1, slug="page-1-1")
47 +
    wagtail_factories.PageFactory(parent=page_1, slug="page-1-2")
48 +
    wagtail_factories.PageFactory(parent=page_1, slug="page-1-3")
49 49
50 -
    page_2 = wagtail_factories.PageFactory(parent=root, slug='page-2')
51 -
    wagtail_factories.PageFactory(parent=page_2, slug='page-2-1')
52 -
    wagtail_factories.PageFactory(parent=page_2, slug='page-2-2')
53 -
    wagtail_factories.PageFactory(parent=page_2, slug='page-2-3')
54 -
    wagtail_factories.PageFactory(parent=page_2, slug='page-2-4')
50 +
    page_2 = wagtail_factories.PageFactory(parent=root, slug="page-2")
51 +
    wagtail_factories.PageFactory(parent=page_2, slug="page-2-1")
52 +
    wagtail_factories.PageFactory(parent=page_2, slug="page-2-2")
53 +
    wagtail_factories.PageFactory(parent=page_2, slug="page-2-3")
54 +
    wagtail_factories.PageFactory(parent=page_2, slug="page-2-4")
55 55
56 56
    assert len(root.get_children()) == 2
57 57
    assert len(page_1.get_children()) == 3
@@ -63,19 +63,20 @@
Loading
63 63
    Page.objects.all().delete()
64 64
65 65
    page = wagtail_factories.PageFactory(
66 -
        slug='page-1-2-3',
66 +
        slug="page-1-2-3",
67 67
        title="Page 1.2.3",
68 -
        parent__slug='page-1-2',
69 -
        parent__title='Page 1.2',
70 -
        parent__parent__slug='page-1',
71 -
        parent__parent__title='Page 1',
72 -
        parent__parent__parent=None)
68 +
        parent__slug="page-1-2",
69 +
        parent__title="Page 1.2",
70 +
        parent__parent__slug="page-1",
71 +
        parent__parent__title="Page 1",
72 +
        parent__parent__parent=None,
73 +
    )
73 74
74 75
    assert Page.objects.count() == 3, Page.objects.all()
75 76
76 -
    assert page.slug == 'page-1-2-3'
77 -
    assert page.get_parent().slug == 'page-1-2'
78 -
    assert page.get_parent().get_parent().slug == 'page-1'
77 +
    assert page.slug == "page-1-2-3"
78 +
    assert page.get_parent().slug == "page-1-2"
79 +
    assert page.get_parent().get_parent().slug == "page-1"
79 80
    assert page.get_parent().get_parent().get_parent() is None
80 81
81 82
@@ -117,7 +118,7 @@
Loading
117 118
@pytest.mark.django_db
118 119
def test_image_no_args_or_kwargs():
119 120
    image = wagtail_factories.ImageFactory()
120 -
    assert image.collection.name == 'Test collection'
121 +
    assert image.collection.name == "Test collection"
121 122
122 123
123 124
@pytest.mark.django_db
@@ -125,15 +126,20 @@
Loading
125 126
    root_collection = wagtail_factories.CollectionFactory(parent=None)
126 127
127 128
    image = wagtail_factories.ImageFactory(
128 -
        collection__parent=root_collection,
129 -
        collection__name='new')
130 -
    assert image.collection.name == 'new'
129 +
        collection__parent=root_collection, collection__name="new"
130 +
    )
131 +
    assert image.collection.name == "new"
131 132
132 133
133 134
@pytest.mark.django_db
134 135
def test_get_or_create():
135 -
    page_1 = MyTestPageGetOrCreateFactory(slug="foobar")
136 -
    page_2 = MyTestPageGetOrCreateFactory(slug="foobar")
136 +
    root_page = wagtail_factories.PageFactory(parent=None)
137 +
    page_1 = MyTestPageGetOrCreateFactory(
138 +
        slug="foobar", parent__slug="root", parent__parent=root_page
139 +
    )
140 +
    page_2 = MyTestPageGetOrCreateFactory(
141 +
        slug="foobar", parent__slug="root", parent__parent=root_page
142 +
    )
137 143
138 144
    assert page_1.pk == page_2.pk
139 145

@@ -6,12 +6,11 @@
Loading
6 6
7 7
8 8
def pytest_configure():
9 -
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.settings')
9 +
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings")
10 10
    django.setup()
11 11
12 12
13 -
@pytest.fixture(scope='session', autouse=True)
13 +
@pytest.fixture(scope="session", autouse=True)
14 14
def custom_settings(tmpdir_factory):
15 -
    overrides = override_settings(
16 -
        MEDIA_ROOT=str(tmpdir_factory.mktemp('media')))
15 +
    overrides = override_settings(MEDIA_ROOT=str(tmpdir_factory.mktemp("media")))
17 16
    overrides.enable()
Files Coverage
tests 99.48%
Project Totals (8 files) 99.48%
76.4
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=py36-django111-wagtail230
76.5
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=py36-django210-wagtail230
76.1
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
TOXENV=py35-django111-wagtail230
76.2
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
TOXENV=py35-django210-wagtail230
76.8
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
TOXENV=py37-django210-wagtail230
76.7
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
TOXENV=py37-django111-wagtail230
76.9
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
TOXENV=py37-django220-wagtail250
76.6
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=py36-django220-wagtail250

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading