Skip to content

Commit

Permalink
[#1117] Add another example to testing guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hammond committed Oct 1, 2013
1 parent 9147540 commit 098ac5d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion doc/testing-coding-standards.rst
Expand Up @@ -187,7 +187,12 @@ give the following recipe for all unit test methods to follow:
3. Make assertions about the return value, and / or any side effects.
4. Do absolutely nothing else.

Most CKAN tests should follow this form.
Most CKAN tests should follow this form. Here's an example of a simple action
function test demonstrating the recipe:

.. literalinclude:: ../ckan/new_tests/logic/action/test_update.py
:start-after: ## START-AFTER
:end-before: ## END-BEFORE

One common exception is when you want to use a ``for`` loop to call the
function being tested multiple times, passing it lots of different arguments
Expand Down

0 comments on commit 098ac5d

Please sign in to comment.