All Projects → lk-geimfari → mimesis-factory

lk-geimfari / mimesis-factory

Licence: MIT license
Mimesis integration with factory_boy

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to mimesis-factory

csgo-gsi
A Java library for Counter-Strike: Global Offensive's game state integration
Stars: ✭ 23 (-45.24%)
Mutual labels:  integration
python-pytest-harvest
Store data created during your `pytest` tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes.
Stars: ✭ 44 (+4.76%)
Mutual labels:  pytest
hass-amplifi
A home assistant integration for Ubiquiti Amplifi
Stars: ✭ 17 (-59.52%)
Mutual labels:  integration
ipython pytest
Pytest magic for IPython notebooks
Stars: ✭ 33 (-21.43%)
Mutual labels:  pytest
node-red-contrib-FIWARE official
FIWARE-Node-Red integration supporting NGSI-LD
Stars: ✭ 14 (-66.67%)
Mutual labels:  integration
pytest-datafixtures
Data fixtures for pytest made simple
Stars: ✭ 24 (-42.86%)
Mutual labels:  pytest
ld-redux
A library to integrate launch darkly with react redux
Stars: ✭ 33 (-21.43%)
Mutual labels:  integration
camel-k-examples
Apache Camel K Examples
Stars: ✭ 48 (+14.29%)
Mutual labels:  integration
covdefaults
A coverage plugin to provide sensible default settings
Stars: ✭ 38 (-9.52%)
Mutual labels:  pytest
pytest-testrail
pytest plugin for integration with TestRail, for creating testruns and updating results
Stars: ✭ 88 (+109.52%)
Mutual labels:  pytest
pytest-mongodb
pytest plugin for mocking MongoDB with fixtures
Stars: ✭ 56 (+33.33%)
Mutual labels:  pytest
pytest-emoji
A pytest plugin that adds emojis to your test result report 😍
Stars: ✭ 41 (-2.38%)
Mutual labels:  pytest
pytest-elk-reporter
A plugin to send pytest test results to ELK stack
Stars: ✭ 17 (-59.52%)
Mutual labels:  pytest
publishing-python-packages
Examples and exercises for Publishing Python Packages from Manning Books 🐍 📦 ⬆️
Stars: ✭ 25 (-40.48%)
Mutual labels:  pytest
nuts
NUTS defines a desired network state and checks it against a real network using pytest and nornir.
Stars: ✭ 47 (+11.9%)
Mutual labels:  pytest
onlyoffice-confluence
The plugin which enables the users to edit office documents from Confluence using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to Confluence
Stars: ✭ 34 (-19.05%)
Mutual labels:  integration
ViewControllersFactory
Instantiate your ViewControllers easily with this small factory class
Stars: ✭ 26 (-38.1%)
Mutual labels:  factory
pytest-html-reporter
Generates a static html report based on pytest framework
Stars: ✭ 69 (+64.29%)
Mutual labels:  pytest
pytest-test-groups
A Pytest plugin that gives you a way to split your tests into groups of a specific size
Stars: ✭ 37 (-11.9%)
Mutual labels:  pytest
emacs-python-pytest
run pytest inside emacs
Stars: ✭ 105 (+150%)
Mutual labels:  pytest

mimesis_factory

test codecov PyPI version wemake-python-styleguide

Description

Mimesis integration for factory_boy.

Installation

pip install mimesis_factory

Usage

Look at the example below and you’ll understand how it works:

class Account(object):
    def __init__(self, username, email, name, surname, age):
        self.username = username
        self.email = email
        self.name = name
        self.surname = surname
        self.age = age

Now, use the MimesisField class from mimesis_factory to define how fake data is generated:

import factory
from mimesis_factory import MimesisField

from account import Account


class AccountFactory(factory.Factory):
    class Meta(object):
        model = Account

    username = MimesisField('username', template='l_d')
    name = MimesisField('name', gender='female')
    surname = MimesisField('surname', gender='female')
    age = MimesisField('age', minimum=18, maximum=90)
    email = factory.LazyAttribute(
        lambda instance: '{0}@example.org'.format(instance.username)
    )
    access_token = MimesisField('token', entropy=32)

pytest

We also recommend to use pytest-factoryboy. This way it will be possible to integrate your factories into pytest fixtures.

License

mimesis_factory is released under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].