tests Package¶
tests Package¶
restfulchemy.tests.__init__¶
Tests for RESTfulchemy create, get, and update methods.
| copyright: | (c) 2015 by Nicholas Repole and contributors. See AUTHORS for more details. |
|---|---|
| license: | MIT - See LICENSE for more details. |
-
class
restfulchemy.tests.AlbumPlus(**kwargs)[source]¶ Bases:
mqlalchemy.tests.models.AlbumExtension class of Album for test purposes.
-
album_id¶
-
artist¶
-
artist_id¶
-
test= <object object>¶
-
title¶
-
-
class
restfulchemy.tests.RESTfulchemyTests(methodName='runTest')[source]¶ Bases:
unittest.case.TestCaseA collection of RESTfulchemy tests.
-
test_get_class_attributes_invalid_attr_fail()[source]¶ Ensure get_class_attributes fails - no such attr in model.
-
test_get_class_attributes_invalid_start_fail()[source]¶ Ensure get_class_attributes fails - no leading class name.
-
test_invalid_set_relation_parent()[source]¶ Make sure that $id errors when parent isn’t relationship.
-
test_invalid_set_relation_parent_column()[source]¶ Make sure that $id errors when parent is a column prop.
-
test_list_relation_add_item_generic_whitelist()[source]¶ Ensure generic whitelisting works for updating a relation.
-
test_list_relation_add_item_no_add_fail()[source]¶ Make sure that we can add an item to a list relation.
-
test_list_relation_add_item_whitelist()[source]¶ Make sure we can add an item to a whitelisted relation.
-
test_list_relation_add_item_whitelist_fail()[source]¶ Ensure whitelisting rightly fails for updating a relation.
-
test_list_relation_new_generic_whitelist()[source]¶ Make sure generic whitelisting works for list relations.
-
test_list_relation_new_whitelist_fail()[source]¶ Make sure whitelisting properly fails for list relations.
-
test_list_relation_remove_item()[source]¶ Make sure that we can remove an item from a list relation.
-
test_list_relation_remove_item_generic_whitelist()[source]¶ Ensure generic whitelisting works for deleting a relation.
-
test_list_relation_remove_item_whitelist()[source]¶ Make sure we can remove an item in a whitelisted relation.
-
test_list_relation_remove_item_whitelist_fail()[source]¶ Ensure whitelisting rightly fails for deleting a relation.
-
test_list_relation_update_item_whitelist()[source]¶ Ensure we can update a whitelisted list relationship item.
-
test_new_single_relation_item_generic_whitelist()[source]¶ Ensure a generic whitelist works for a non-list relation.
-
test_new_single_relation_item_whitelist()[source]¶ Make sure a whitelisted non-list relation can be set.
-
test_new_single_relation_item_whitelist_fail()[source]¶ Ensure a non-whitelisted new non-list relation fails.
-
test_remove_single_relation_item_generic_whitelist()[source]¶ Ensure generic whitelisted non-list relation is deletable.
-
test_remove_single_relation_item_whitelist()[source]¶ Make sure a whitelisted non-list relation can be removed.
-
test_remove_single_relation_item_whitelist_fail()[source]¶ Ensure invalid whitelist fails to remove single relation.
-
test_set_empty_single_relation_item()[source]¶ Make sure that an empty non-list relation can be set.
-
test_set_empty_single_relation_item_no_set_fail()[source]¶ Ensure no .$set causes failure on null non list relation.
-
test_set_empty_single_relation_item_whitelist_fail()[source]¶ Ensure setting empty non whitelisted relation item fails.
-
test_set_single_relation_item_generic_whitelist()[source]¶ Ensure a generic whitelist works for a non-list relation.
-
test_set_single_relation_item_no_set_fail()[source]¶ Ensure no .$set causes a failure on non list relation.
-
test_set_single_relation_item_whitelist()[source]¶ Make sure a whitelisted non-list relation can be set.
-
test_set_single_relation_item_whitelist_fail()[source]¶ Ensure setting non whitelisted single relation items fail.
-
test_single_relation_item_no_id_fail()[source]¶ Ensure we can’t set a non list relation field with no id.
-