{ "info": { "author": "Conner Swann", "author_email": "me@connerswann.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Pytest", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries" ], "description": "PySnap |travis| |pypi|\n============================\n\nNote: This project is just a fork of the package ``snapshottest`` which lives here: https://github.com/syrusakbary/snapshottest. It had been mostly abandoned, so I kicked the wheels and got it back in working order. Contributions are welcome!\n\nSnapshot testing is a way to test your APIs without writing actual test\ncases.pip install doc8\n\n1. A snapshot is a single state of your API, saved in a file.\n2. You have a set of snapshots for your API endpoints.\n3. Once you add a new feature, you can generate *automatically* new\n snapshots for the updated API.\n\n.. code:: html\n\n
\n\n.. code:: html\n\n
\n\nInstallation\n------------\n\n::\n\n $ pip install pysnap\n\nUsage with unittest/nose\n------------------------\n\n.. code:: python\n\n from pysnap import TestCase\n\n class APITestCase(TestCase):\n def test_api_me(self):\n \"\"\"Testing the API for /me\"\"\"\n my_api_response = api.client.get('/me')\n self.assertMatchSnapshot(my_api_response)\n\n # Set custom snapshot name: `gpg_response`\n my_gpg_response = api.client.get('/me?gpg_key')\n self.assertMatchSnapshot(my_gpg_response, 'gpg_response')\n\nIf you want to update the snapshots automatically you can use the\n``nosetests --snapshot-update``.\n\nCheck the `Unittest\nexample