{ "info": { "author": "Nicolas Lara", "author_email": "nicolas@lincolnloop.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Testing" ], "description": "# DjangoCMS Testing\n\nA set of utils to simplify testing on Django CMS plugins and pages\n\n## Usage\n\n### Testing all plugins\n\n```\nimport os\n\nfrom .base import BaseTestCase\n\nfrom filer.models import Image\nfrom djangocms_testing.integrity import CMSPluginIntegrity\n\n\nclass DSMPluginIntegrityTestCase(BaseTestCase, CMSPluginIntegrity):\n\n plugin_exclude_list = [\n 'SomePluginsToExclude',\n 'AnotherPluginToExclude',\n ]\n\n def setUp(self):\n self.homepage = self.create_page('Homepage')\n\n # Create any data that may be necessary for the plugins\n\n # Example: Creating an image\n photo_path = os.path.join(os.path.dirname(__file__), 'files', 'sample_image.jpg')\n self.test_image = Image.objects.create(file=photo_path)\n\n # Update the plugin list\n self.plugin_list = [\n ('CategoryPlugin', {'title': 'Top Category'}),\n ('BannerPlugin', {'icon': self.test_image, 'link': self.homepage}),\n ('LinkToPagePlugin', {'page': self.homepage}),\n ]\n```\n\n### Loading Pages\n\nThere's a management command that allows you to create pages from a\nYAML description.\n\nThe page description looks like this:\n\n```\n---\n# Required page data\ntitle: Regression Test Page\nslug: regression-test-page\ntemplate: generic_page # (generic_page is provided. You can use other templates by overriding _get_template)\n\n# Optional page data # Default value\npublish: no # no (yes | no)\nlanguage: en # en (en | es)\napphook: null # null (string)\napphook_namespace: null # null (string)\nsoft_root: no # no (yes | no)\n\n# Placeholder variables\n#\n# Provided:\n# $loremispum 1 paragraph of lorem ipsum text.\n#\n# You can add other variables by overriding _generate_sample_data\n# $image JPEG image\n# $svg SVG Tiger iimage\n\n# Placeholders vary per template but its no problem to define them all\n# in advance, and later just switch the template type:\n#\n# generic_page > content\n\nplaceholders:\n content:\n\n - CategoryPlugin:\n title: Category 1\n subplugins:\n\n - QuestionPlugin:\n question: >\n This is a question\n author: Author, 21\n subplugins:\n\n - AnswerPlugin:\n body: >\n This is the text's body\n\n```\n\n Create the page: `manage.py page simple_test.yaml`\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nicolaslara/djangocms_testing/", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "djangocms-testing", "package_url": "https://pypi.org/project/djangocms-testing/", "platform": "", "project_url": "https://pypi.org/project/djangocms-testing/", "project_urls": { "Homepage": "https://github.com/nicolaslara/djangocms_testing/" }, "release_url": "https://pypi.org/project/djangocms-testing/0.1/", "requires_dist": [ "django-cms (>=3.4.5)", "PyYAML (>=3.12)" ], "requires_python": ">=3.6", "summary": "Testing utilities for Django CMS", "version": "0.1" }, "last_serial": 4144781, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "38d94cc3d725fc5d067d9a42cf96658d", "sha256": "e811090997ef4f84b06584c61a94112f5e8c1e15fe4dae0a27c46872cc2e45d7" }, "downloads": -1, "filename": "djangocms_testing-0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "38d94cc3d725fc5d067d9a42cf96658d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=3.6", "size": 5346, "upload_time": "2018-08-07T15:52:38", "url": "https://files.pythonhosted.org/packages/0a/c3/208c5735700cfed777fb6ae3061e6ae77c3c9254c0423c0438da1dceb69e/djangocms_testing-0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4d5dedf41f5f0e0a74616bb1c74d1de2", "sha256": "1cc731d0d764a4a62ee64ab2e1e428889feee0c482989e09b84ac7447b77c364" }, "downloads": -1, "filename": "djangocms_testing-0.1.tar.gz", "has_sig": false, "md5_digest": "4d5dedf41f5f0e0a74616bb1c74d1de2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5504, "upload_time": "2018-08-07T15:52:39", "url": "https://files.pythonhosted.org/packages/67/43/66be0611855042bcb018477296c64cc1eb6fb324c49401961abc95ef7b69/djangocms_testing-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "38d94cc3d725fc5d067d9a42cf96658d", "sha256": "e811090997ef4f84b06584c61a94112f5e8c1e15fe4dae0a27c46872cc2e45d7" }, "downloads": -1, "filename": "djangocms_testing-0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "38d94cc3d725fc5d067d9a42cf96658d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=3.6", "size": 5346, "upload_time": "2018-08-07T15:52:38", "url": "https://files.pythonhosted.org/packages/0a/c3/208c5735700cfed777fb6ae3061e6ae77c3c9254c0423c0438da1dceb69e/djangocms_testing-0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4d5dedf41f5f0e0a74616bb1c74d1de2", "sha256": "1cc731d0d764a4a62ee64ab2e1e428889feee0c482989e09b84ac7447b77c364" }, "downloads": -1, "filename": "djangocms_testing-0.1.tar.gz", "has_sig": false, "md5_digest": "4d5dedf41f5f0e0a74616bb1c74d1de2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5504, "upload_time": "2018-08-07T15:52:39", "url": "https://files.pythonhosted.org/packages/67/43/66be0611855042bcb018477296c64cc1eb6fb324c49401961abc95ef7b69/djangocms_testing-0.1.tar.gz" } ] }