The main purpose of this article is just to share my experience on using unittest module in Python.
I chose version 2.7.10 for this case, but I think we may expect the same behavior with Python 3.X
Documentation about unittest module available via following link: https://docs.python.org/2/library/unittest.html, the site interface with documentation is easy and you can simply switch to the same topic, but another version of Python.
In this article I will demonstrate my source code snippets with links for GitHub (where you can find full version)
Initially I've prepared a special class with functionality that we will be using to demonstrate unittest usage.
The class can be used for the following:
- To generate a dictionary with random keys and values
- To store generated dictionary like a JSON object into a file (by using standard library in Python)
- To upload from the file the JSON object back to the dictionary
Latest version of the class could be found here (GitHub)
Now let's start with preparation of simple unit tests lists. You can find basic information about the unit test on Wikipedia. It provides enough knowledge to start working with that.
Let's switch to practice.

