Skip to main content

Helper package for django unittest

Project description

django_unittest_image_helper

An open source package for helping the django unittest journey

Description

A Python library to facilitate the django unittesting journey.

Installation

pip install django-unittest-helper

Usage

For getting dummy form-data images for payload during unittesting

from django_unittest_helper import form_image_helper
payload = form_image_helper(caption_list=['photo', 'map'], image_suffix=".jpg")

The above code will return dummy images for api testing.

There are 2 parameters for this method-

  1. caption_list : Provide caption titles for the payload in list.
  2. image_suffix : Provide the extension of the images as per your need.

For generating random phone number

from django_unittest_helper import generate_random_phone_no

phone_no = generate_random_phone_no(prefix="013", total_digit=11)

The above code will return a dummy phone number based on random digits

There are 2 parameters for this method-

  1. prefix : Provide the prefix of the operator of phone no
  2. total_digit: Provide the total digits of the phone number you need

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_unittest_helper-0.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file django_unittest_helper-0.3-py3-none-any.whl.

File metadata

  • Download URL: django_unittest_helper-0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for django_unittest_helper-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9c65a8a306cd2b2f811e6e6eaa190193b072b6e711f8430e6472b3bd12d66369
MD5 4247ce4b0d82be0123d1a9134851f807
BLAKE2b-256 0c8368b29ba44948726c6b5f170b7eb5a86ea3f87504c68ccfb44dc2665106cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page