An open source package for helping the django unittest journey
A Python library to facilitate the django unittesting journey.
pip install django-unittest-helper
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-
caption_list
: Provide caption titles for the payload in list.image_suffix
: Provide the extension of the images as per your need.
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-
prefix
: Provide the prefix of the operator of phone nototal_digit
: Provide the total digits of the phone number you need