Mercurial > kallithea
view MIT-Permissive-License.txt @ 6142:437b41b18420
tests: admin_permissions: split test_delete_ips from test_add_ips
While it is not necessary to be pedantic and split each assert in a separate
test, it makes sense to create separate tests for separate logical actions.
This makes it easy to understand from a test summary what works and what
doesn't.
Add and delete are deemed two such separate logical actions. The original
test_add_ips test did both add and delete, but was not even named to cover
this.
Note that the 'add' in the delete test is not the same as the 'add' in the
add test, i.e. for the delete test direct method calls are made instead of
passing through self.app.get/post (which is a higher layer of abstraction).
Background of this commit: during the Turbogears2 port, delete actions were
not yet functional, and 'test_add_ips' failed as a result even though 'add'
was perfectly fine.
author | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> |
---|---|
date | Fri, 19 Aug 2016 21:32:23 +0200 |
parents | 08baa849c8a8 |
children |
line wrap: on
line source
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.