# pytest-djangoapp documentation

https://github.com/idlesign/pytest-djangoapp

## Description

Nice pytest plugin to help you with Django pluggable application testing.

This exposes some useful tools for Django applications developers to facilitate tests authoring, including:

- Settings overriding

- Template tags testing

- User creation

- Request object creation

- Management command calls

- Mailing

- Migrations

- Messages

- DB queries audit

- Live server & client UI testing

- etc.

Suitable for testing apps for Django 1.8+.

## Requirements

1. Python 3.6+

## Table of Contents

- Quickstart
  - Application structuring
  - Configuring djangoapp
  - Testing an entire project
  - Using fixtures
  - Additional app for testing
- Fixtures
  - Commands
    - `command_makemigrations()`
    - `command_run()`
  - Database
    - `Queries`
      - `Queries.clear()`
      - `Queries.clear_all()`
      - `Queries.get_log()`
      - `Queries.sql()`
      - `Queries.time()`
    - `db_queries()`
  - Settings
    - `settings()`
  - Request
    - `DjagoappClient`
      - `DjagoappClient.store_exc_info()`
    - `DjangoappRequestFactory`
      - `DjangoappRequestFactory.generic()`
    - `request_client()`
    - `request_factory()`
    - `request_get()`
    - `request_post()`
  - Templates
    - `template_context()`
    - `template_render_tag()`
    - `template_strip_tags()`
  - Users
    - `user()`
    - `user_create()`
    - `user_model()`
  - Mail
    - `mail_outbox()`
  - Messages
    - `messages()`
  - Migrations
    - `check_migrations()`
  - Utils
    - `conf_app_name()`
    - `get_stamp()`
  - Live server & client
    - `LiveClient`
    - `SeleniumLiveClient`
    - `liveclient()`
    - `liveserver()`