{ "info": { "author": "Oliver Cope", "author_email": "oliver@redgecko.org", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Testing" ], "description": ".. Copyright 2014 Oliver Cope\n..\n.. Licensed under the Apache License, Version 2.0 (the \"License\");\n.. you may not use this file except in compliance with the License.\n.. You may obtain a copy of the License at\n..\n.. http://www.apache.org/licenses/LICENSE-2.0\n..\n.. Unless required by applicable law or agreed to in writing, software\n.. distributed under the License is distributed on an \"AS IS\" BASIS,\n.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n.. See the License for the specific language governing permissions and\n.. limitations under the License.\n\nToffee: Test Object Factory Fixtures\n====================================\n\nToffee creates factories for your model fixtures::\n\n from toffee import Fixture, Factory\n\n product_factory = Factory(Product, id=Seq())\n\n\n class MyFixture(Fixture):\n product_1 = product_factory(desc='cuddly toy')\n product_2 = product_factory(desc='toy tractor')\n user = Factory(User, username='fred')\n order = Factory(Order, user=user, products=[product_1, product_2])\n\n\n def test_product_search():\n\twith MyFixture() as f:\n assert f.product_1 in search_products('toy')\n assert f.product_2 in search_products('toy')\n\n\nToffee is similar in scope to\n`factory_boy `_.\nThe differences that prompted me to write a new library are:\n\n- Toffee promotes working with on fixtures as groups of objects to be created\n and destroyed as a unit, rather than individual factories\n- Explicit support for setup/teardown of fixtures\n\n\nRead the `Toffee documentation `_ to\nfind out more, or visit the `bitbucket repo `_.\n\nToffee is developed and maintained by `Olly Cope `_.\n\n\n.. Copyright 2014 Oliver Cope\n..\n.. Licensed under the Apache License, Version 2.0 (the \"License\");\n.. you may not use this file except in compliance with the License.\n.. You may obtain a copy of the License at\n..\n.. http://www.apache.org/licenses/LICENSE-2.0\n..\n.. Unless required by applicable law or agreed to in writing, software\n.. distributed under the License is distributed on an \"AS IS\" BASIS,\n.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n.. See the License for the specific language governing permissions and\n.. limitations under the License.\n\nCHANGELOG\n=========\n\n1.0.0 (released 2019-05-15)\n---------------------------\n\n- Added support for Python 3.7\n- Dropped support for Python 2.x\n\n0.2.1 (released 2017-10-04)\n---------------------------\n\n- Added support for Python 3.5, 3.6. Dropped support for Python 3.3, 3.4\n\n\nVersion 0.2.0\n-------------\n\n- Dropped support for using setattr to configure subobjects. Use the double\n underscore convention instead.\n- Attribute/item setting on factory objects now results in the same operation\n being carried out on the generated object. This is useful for creating\n circular references between factory objects.\n- Lists of factory objects are now supported, making it easier to manage\n large numbers of test objects.\n- Factories now can take a ``partial`` flag. This stops the factory from\n producing a top-level named object, while still allowing it to be used for\n the basis of other factories.\n\nVersion 0.1.6\n-------------\n\n- Added support for Python 3.4.\n- Dropped support for Python 3.2.\n- Tests that delete fixture objects before teardown is called no longer cause\n SQLAlchemy to invalidate the transaction (and thus potentially cause later\n tests to fail unexpectedly).\n- Added a scope argument to Seq(), that determines whether the sequence counter\n is reset at the start of each fixture set up or only once, at the start of\n the test run.\n\nVersion 0.1.5\n-------------\n\n- Licensing: toffee is now licensed under the Apache License, Version 2.0\n- Bugfix: Fixed exception in LazyRecorderFactory.destroy_object during fixture\n teardown\n\nVersion 0.1.4\n-------------\n\n- Added toffee.TestWithFixture\n\nVersion 0.1.3\n-------------\n\n- The data mapper factories (SQLAlchemy and Storm) support querying for\n existing objects in fixtures\n- Added experimental SQLAlchemy support\n\nVersion 0.1.2\n-------------\n\n- Made setting factoryoptions more flexible. It's now possible to change the\n default flush/commit behavior of StormFactory per fixture class and or at\n setup time when using the context manager syntax.\n\nVersion 0.1.1\n-------------\n\n- Bugfix: StormFactory did not flush/commit the store on fixture teardown\n teardown, meaning the store would not be left clean for subsequent operations\n\nVersion 0.1\n-----------\n\n- initial release\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://ollycope.com/software/toffee/", "keywords": "fixtures fixture factory factory_boy test testing sqlalchemy storm django", "license": "Apache", "maintainer": "", "maintainer_email": "", "name": "toffee", "package_url": "https://pypi.org/project/toffee/", "platform": "", "project_url": "https://pypi.org/project/toffee/", "project_urls": { "Homepage": "https://ollycope.com/software/toffee/" }, "release_url": "https://pypi.org/project/toffee/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Toffee: Test Object Fixture Factories - easy creation of data fixtures for tests", "version": "1.0.0" }, "last_serial": 5273653, "releases": { "0": [], "0.1": [ { "comment_text": "", "digests": { "md5": "a4bcab82f10ced09848bc2ede3caab65", "sha256": "303a87b216aaf72845750bf99dcd0e63bfa5828ad7e6a344beeb75606116cd3d" }, "downloads": -1, "filename": "toffee-0.1.tar.gz", "has_sig": false, "md5_digest": "a4bcab82f10ced09848bc2ede3caab65", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8497, "upload_time": "2013-05-14T14:12:11", "url": "https://files.pythonhosted.org/packages/e9/89/e60071910f7fdb50d9254f5c72d5c31e7eb4bf1b2f1482e719cb5e439683/toffee-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "5667c473dddf3a8e42ddda0e2545d018", "sha256": "01e0ae0ad0aa96e8021d372c45123fee135ed1ed61b7c81621a5c4aacaebd6b9" }, "downloads": -1, "filename": "toffee-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5667c473dddf3a8e42ddda0e2545d018", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8741, "upload_time": "2013-05-15T15:51:34", "url": "https://files.pythonhosted.org/packages/87/10/ea231b1c87cb2764ef072b2bb09c8682a40dbfa1f19ec2d3d0380ed5203f/toffee-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "88d74da87dd030e6e7ec2fd70d872ed2", "sha256": "9e4cb0cdd465cd570300b9528a0ce4338149a3fd44aaeb374c05f3847cafb3a2" }, "downloads": -1, "filename": "toffee-0.1.2.tar.gz", "has_sig": false, "md5_digest": "88d74da87dd030e6e7ec2fd70d872ed2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9736, "upload_time": "2013-05-21T10:10:50", "url": "https://files.pythonhosted.org/packages/a8/51/10e8b361a7e22977772c2190a04fde4f2fad04f470dd2e018daec38f0426/toffee-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "65421252e127a00b7586b85ca30b03b8", "sha256": "3f0e429b9786ff4537bf85844eb201d24d9503d72148e0626a6b21b9da30de17" }, "downloads": -1, "filename": "toffee-0.1.3.tar.gz", "has_sig": false, "md5_digest": "65421252e127a00b7586b85ca30b03b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12436, "upload_time": "2014-01-01T15:36:31", "url": "https://files.pythonhosted.org/packages/60/37/8889fb9adc25e10d911a34c0bd48b18a5c6abb4f42cbb811bae9d897e5de/toffee-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "f954f277a922739fe42c26ec864b99db", "sha256": "2cfa9613d206fb3ebca062c2733ac6ac016e4f04068ab3b0405f37b4d1ba9f9e" }, "downloads": -1, "filename": "toffee-0.1.4.tar.gz", "has_sig": false, "md5_digest": "f954f277a922739fe42c26ec864b99db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14221, "upload_time": "2014-02-28T11:07:12", "url": "https://files.pythonhosted.org/packages/a8/4f/c2d17a740e9d4a26b3678dcf81309b4153edb3b69d9723a5e7f6b2541324/toffee-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "0a0fdb7dd0a52c614dde6c4727a0237f", "sha256": "b91c6eb9c1f73bde90fa3ae847a7f0c3dbfd27d6a2cd672b8cfeac9893f00884" }, "downloads": -1, "filename": "toffee-0.1.5.tar.gz", "has_sig": false, "md5_digest": "0a0fdb7dd0a52c614dde6c4727a0237f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21306, "upload_time": "2014-06-27T08:35:23", "url": "https://files.pythonhosted.org/packages/e1/27/f5d644a472b42fbf2d3324770a29cfd85bd163bdaf05be12fc4bfe932ed2/toffee-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "d4a2c47427f042cf402ac8e43fb8697f", "sha256": "60e31663b4b729e2ef28a1041e6ae8e88921bc9588382d0ae6402c47951bbfe9" }, "downloads": -1, "filename": "toffee-0.1.6.tar.gz", "has_sig": false, "md5_digest": "d4a2c47427f042cf402ac8e43fb8697f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22828, "upload_time": "2014-09-11T14:21:55", "url": "https://files.pythonhosted.org/packages/1c/de/1f11e51e999556dff99d0cb5412f307cd3900c22c98a049859d20f1bcb93/toffee-0.1.6.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "a558c3db7b57b471533030ef0980d815", "sha256": "00ba57d330acb7039cdbd6b119a5dcbffe46555c57c4e10de3b3fbfabf1876a4" }, "downloads": -1, "filename": "toffee-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a558c3db7b57b471533030ef0980d815", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26690, "upload_time": "2015-06-28T12:40:40", "url": "https://files.pythonhosted.org/packages/00/7d/3fb83ae32280706e88c0bc6d0cec15c4799460d63f25bdf4bddc731da283/toffee-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "9947ffdbdf90bc7caad21897fbd5aa24", "sha256": "bbedda69367eb22ac81c0b7c13f060b6c4b076ce6431efbc70f0656fd8f062dd" }, "downloads": -1, "filename": "toffee-0.2.1-py2-none-any.whl", "has_sig": false, "md5_digest": "9947ffdbdf90bc7caad21897fbd5aa24", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 12553, "upload_time": "2017-10-04T12:09:28", "url": "https://files.pythonhosted.org/packages/47/4c/d852bc1d66508fae409d8ad17b513a4548de01173cf3bbe2b0771c708a8d/toffee-0.2.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e1373cfd797c93caf4916831a150b12", "sha256": "6bc671d995a310502f9db82487e6866727b73c715ed9de54c462fa2e5b8ba593" }, "downloads": -1, "filename": "toffee-0.2.1.tar.gz", "has_sig": false, "md5_digest": "4e1373cfd797c93caf4916831a150b12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13551, "upload_time": "2017-10-04T12:09:30", "url": "https://files.pythonhosted.org/packages/6a/44/4408f09bf37eae6cd417937a34fb8148d8d39989a18751ac1208402e3c7f/toffee-0.2.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "4bc03f699c9fed77ab7cff2ac421b60e", "sha256": "5dd761a85d45d2e7c10c009655693c3cfba32fcbe669fb521256032660614d3a" }, "downloads": -1, "filename": "toffee-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4bc03f699c9fed77ab7cff2ac421b60e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12623, "upload_time": "2019-05-15T17:56:22", "url": "https://files.pythonhosted.org/packages/6f/26/addbecfc2ec6f7f12c05defd91c0a1565bdd060a7b60a812ae631689d43f/toffee-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ee66673d129452fa9e0402ee9b1f1dad", "sha256": "2bf32f997eec5b378ccb22a88be532e112b7497ed40badee18d59810145cd2e2" }, "downloads": -1, "filename": "toffee-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ee66673d129452fa9e0402ee9b1f1dad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15210, "upload_time": "2019-05-15T17:56:23", "url": "https://files.pythonhosted.org/packages/85/03/1afcce7ab48a9d0e5c6a466f152dec5cd6ffaeec90cf5ed45dd6a90077ac/toffee-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4bc03f699c9fed77ab7cff2ac421b60e", "sha256": "5dd761a85d45d2e7c10c009655693c3cfba32fcbe669fb521256032660614d3a" }, "downloads": -1, "filename": "toffee-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4bc03f699c9fed77ab7cff2ac421b60e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12623, "upload_time": "2019-05-15T17:56:22", "url": "https://files.pythonhosted.org/packages/6f/26/addbecfc2ec6f7f12c05defd91c0a1565bdd060a7b60a812ae631689d43f/toffee-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ee66673d129452fa9e0402ee9b1f1dad", "sha256": "2bf32f997eec5b378ccb22a88be532e112b7497ed40badee18d59810145cd2e2" }, "downloads": -1, "filename": "toffee-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ee66673d129452fa9e0402ee9b1f1dad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15210, "upload_time": "2019-05-15T17:56:23", "url": "https://files.pythonhosted.org/packages/85/03/1afcce7ab48a9d0e5c6a466f152dec5cd6ffaeec90cf5ed45dd6a90077ac/toffee-1.0.0.tar.gz" } ] }