naughty-string-validator

A library that returns naughty strings from an offline database of Big List of Naughty Strings & emojis


Keywords
naughty, strings, emoji, unicode, emojis, naughty-strings, python, testing, unicode-characters
License
MIT
Install
pip install naughty-string-validator==0.1.7

Documentation

naughty_string_validator

https://travis-ci.org/shashikumarraja/naughty_string_validator_python.svg?branch=master Updates https://pepy.tech/badge/naughty-string-validator

A python library that returns naughty strings from an offline database of Big List of Naughty Strings and emojis. The db will be continuously growing with each release.

The Big List of Naughty Strings is an evolving list of strings which have a high probability of causing issues when used as user-input data.

This library can be inluded in the test automation framework for API, UI, or DB testing to validate them against naughty strings.

Installation

pip install naughty_string_validator

Usage

from naughty_string_validator import *
  • To get a random naughty string from the list
print(get_random_naughty_string())

#output
"<a href=\"\\xE2\\x80\\x88javascript…(1)\" id=\"fuzzelement1\">test</a>"
  • To get entire naughty string list
print(get_naughty_string_list())

#output
["", "undefined", "undef", "null", "NULL", "(null)", "nil", …]
  • To get a random emoji from the emoji list
print(get_random_emoji())

#output
"πŸ˜ƒ"
  • To get a entire emoji list
print(get_emoji_list())

#output
["πŸ˜€", "πŸ˜ƒ", "πŸ˜„", "😁", "πŸ˜†", "πŸ˜…", "πŸ˜‚", "🀣", "☺️", "😊", …]

Tests

  • To run tests

    py.test --cov=naughty_string_validator test/ --verbose