File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -48,17 +48,28 @@ def test_custom_object_update(client):
4848 """Test the return value of the update methods.
4949
5050 It doesn't test the actual update itself.
51- TODO: See if this is worth testing since we're using a mocking backend
5251 """
5352 custom_object = client .custom_objects .create_or_update (
5453 types .CustomObjectDraft (container = "unittest" , key = "test-object-1" , value = 1234 )
5554 )
5655 assert custom_object .key == "test-object-1"
56+ assert custom_object .value == 1234
57+ assert custom_object .version == 1
5758
5859 custom_object = client .custom_objects .create_or_update (
5960 types .CustomObjectDraft (container = "unittest" , key = "test-object-1" , value = 2345 )
6061 )
6162 assert custom_object .key == "test-object-1"
63+ assert custom_object .value == 2345
64+ assert custom_object .version == 2
65+
66+ # And another key
67+ custom_object = client .custom_objects .create_or_update (
68+ types .CustomObjectDraft (container = "unittest" , key = "test-object-2" , value = 3456 )
69+ )
70+ assert custom_object .key == "test-object-2"
71+ assert custom_object .value == 3456
72+ assert custom_object .version == 1
6273
6374
6475def test_custom_object_query_by_container (client ):
You can’t perform that action at this time.
0 commit comments