{ "info": { "author": "Tomas Walch", "author_email": "tomaswalch@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "========\nDjasmine\n========\n\n.. image:: https://travis-ci.org/tjwalch/djasmine.png\n :alt: Build Status\n :target: https://travis-ci.org/tjwalch/djasmine\n.. image:: https://coveralls.io/repos/tjwalch/djasmine/badge.svg?branch=master&service=github\n :alt: Coverage Status\n :target: https://coveralls.io/github/tjwalch/djasmine?branch=master \n\nThis app integrates Jasmine JavaScript tests with the Django test framework in a simple but effective DRY way. Using it\nyou can easily write and run tests that integrates your frontend and backend in a manner that is much easier to maintain\nthan selenium tests interacting with full web pages.\n\nYou can either run individual jasmine spec files and check the result from within your Django test suit or open an url \nfrom your devserver and run all specs at once, checking the result on the webpage.\n\nGetting started\n---------------\n1. Add ``'djasmine'`` to your ``INSTALLED_APPS``::\n\n INSTALLED_APPS = [\n ...\n 'djasmine',\n ]\n\n2. Include the djasmine URLconf in your project ``urls.py`` like this::\n\n url(r'^djasmine/', include('djasmine.urls')),\n\n3. Add the following to your project settings::\n \n import jasmine_core\n \n JASMINE_SPEC_ROOT = BASE_DIR + '/path/to/spec/files'\n \n STATICFILES_DIRS = [\n jasmine_core.__path__[0],\n JASMINE_SPEC_ROOT,\n ]\n\n4. Now you need to get your site's JavasSript files included by the Djasmine runner view. You probably already have them written out in your ``'base.html'`` template or similar. In order to keep DRY you don't want to provide this list again in some test setup file, and with Djasmine you don't have to. Instead break out the list of javascript tags into a special top-level template called ``'javascripts.html'`` and include this in your ``'base.html'`` (or similar). This template will also be picked up by the spec runner code. If you are using e g compressor preprocessing tags the template include approach allows you to use these also for the test running code.\n\n For more specialized needs you can provide your own ``'djasmine/specrunner.html'`` template.\n\nRunning Jasmine specs from Django tests\n---------------------------------------\nCreate your Django tests by using ``djasmine.testcase.JasmineRunnerTestCase`` as base class for your test cases. There is one \nrequired class property, ``webdriver``, that should specify the Selenium WebDriver class you wish to use for the test, \ne g ``selenium.webdriver.firefox.webdriver.WebDriver``.\n\nRun and check result of a Jasmine spec file with the ``assertSpecPasses`` method, which takes one argument: the name\nof your spec file.\n\nExample::\n\n from djasmine.testcase import JasmineRunnerTestCase\n from selenium.webdriver.firefox.webdriver import WebDriver\n\n \n class MyIntegrationTest(JasmineRunnerTestCase):\n webdriver = WebDriver\n \n def test_all_works_nicely(self):\n self.assertSpecPasses('my_tests.spec.js') # Runs everything in this spec file and checks result\n\n ...\n (other checks of backend state possible here)\n ...", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tjwalch/djasmine", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "djasmine", "package_url": "https://pypi.org/project/djasmine/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/djasmine/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/tjwalch/djasmine" }, "release_url": "https://pypi.org/project/djasmine/0.2.3/", "requires_dist": null, "requires_python": null, "summary": "Integrates Jasmine JavaScript tests with the Django test framework in a simple but effective DRY way.", "version": "0.2.3" }, "last_serial": 1872153, "releases": { "0.1": [], "0.2.2": [ { "comment_text": "", "digests": { "md5": "7452e7defdf39b5aefb5a0285e258dc3", "sha256": "506559f156879fda3657d1951de4992b785573dfe42eca125657a46dbaf670c9" }, "downloads": -1, "filename": "djasmine-0.2.2.tar.gz", "has_sig": false, "md5_digest": "7452e7defdf39b5aefb5a0285e258dc3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4791, "upload_time": "2015-12-17T22:36:12", "url": "https://files.pythonhosted.org/packages/16/5f/27f2badfcecd26ab4d0de6d8378cb4fb77de82d3f2dd253eafea11ad59b1/djasmine-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "27bf4ffaffc543dd427a044cfd8a1930", "sha256": "900e5d2b6ad6f3b769648089d8cc1c8c04f5dedb951e5bc0614f3853deab130b" }, "downloads": -1, "filename": "djasmine-0.2.3.tar.gz", "has_sig": false, "md5_digest": "27bf4ffaffc543dd427a044cfd8a1930", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4792, "upload_time": "2015-12-21T14:05:20", "url": "https://files.pythonhosted.org/packages/d9/eb/e1ae458eadcc986e0e48f0d83d3d35168babe0279ebbebbdf06634967564/djasmine-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "27bf4ffaffc543dd427a044cfd8a1930", "sha256": "900e5d2b6ad6f3b769648089d8cc1c8c04f5dedb951e5bc0614f3853deab130b" }, "downloads": -1, "filename": "djasmine-0.2.3.tar.gz", "has_sig": false, "md5_digest": "27bf4ffaffc543dd427a044cfd8a1930", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4792, "upload_time": "2015-12-21T14:05:20", "url": "https://files.pythonhosted.org/packages/d9/eb/e1ae458eadcc986e0e48f0d83d3d35168babe0279ebbebbdf06634967564/djasmine-0.2.3.tar.gz" } ] }