def test_birthdate_custom_strftime_dto(): a = birthdate(custom_strftime="DTO") assert type(a) == type(datetime.now())
from types import StringType, UnicodeType from re import match import pytest from assertlib import assertEqual, assertTrue, assertIsInstance from attrdict import AttrDict from picka import age, hex_color, phone_number, areacode, datetime, rgb, \ birthdate, rgba, html_name, url, surname, zipcode, calling_code, number, \ month, timestamp, business_title, timezone_offset, month_day, \ month_day_year, business_title_abbreviation, barcode, timezone_offset_country, \ screename, mime_type current_year = datetime.now().year def test_hex_color(): h = hex_color() assert "r" in h.keys() assert "g" in h.keys() assert "b" in h.keys() assert "hex" in h.keys() for x in h.values(): if len(x) <= 3: assert 0 <= int(x) <= 256 def test_rbg(): c = rgb() assert "r" in c.keys() assert "g" in c.keys()