@@ -4709,7 +4709,7 @@ def test_get_design_document_all_params(self):
4709
4709
"""
4710
4710
# Set up mock
4711
4711
url = preprocess_url('/testString/_design/testString')
4712
- mock_response = '{"_attachments": {"mapKey": {"content_type": "content_type", "data": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "digest": "digest", "encoded_length": 0, "encoding": "encoding", "follows": false, "length": 0, "revpos": 1, "stub": true}}, "_conflicts": ["conflicts"], "_deleted": true, "_deleted_conflicts": ["deleted_conflicts"], "_id": "_id", "_local_seq": "_local_seq", "_rev": "_rev", "_revisions": {"ids": ["ids"], "start": 1}, "_revs_info": [{"rev": "rev", "status": "available"}], "autoupdate": true, "filters": {"mapKey": "inner"}, "indexes": {"mapKey": {"analyzer": {"name": "classic", "stopwords": ["stopwords"], "fields": {"mapKey": {"name": "classic", "stopwords": ["stopwords"]}}}, "index": "index"}}, "language": "javascript", "options": {"partitioned": false}, "validate_doc_update": "validate_doc_update", "views": {"mapKey": {"map": "map", "options": {}, " reduce": "reduce"}}}'
4712
+ mock_response = '{"_attachments": {"mapKey": {"content_type": "content_type", "data": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "digest": "digest", "encoded_length": 0, "encoding": "encoding", "follows": false, "length": 0, "revpos": 1, "stub": true}}, "_conflicts": ["conflicts"], "_deleted": true, "_deleted_conflicts": ["deleted_conflicts"], "_id": "_id", "_local_seq": "_local_seq", "_rev": "_rev", "_revisions": {"ids": ["ids"], "start": 1}, "_revs_info": [{"rev": "rev", "status": "available"}], "autoupdate": true, "filters": {"mapKey": "inner"}, "indexes": {"mapKey": {"analyzer": {"name": "classic", "stopwords": ["stopwords"], "fields": {"mapKey": {"name": "classic", "stopwords": ["stopwords"]}}}, "index": "index"}}, "language": "javascript", "options": {"partitioned": false}, "validate_doc_update": "validate_doc_update", "views": {"mapKey": {"map": "map", "reduce": "reduce"}}}'
4713
4713
responses.add(
4714
4714
responses.GET,
4715
4715
url,
@@ -4784,7 +4784,7 @@ def test_get_design_document_required_params(self):
4784
4784
"""
4785
4785
# Set up mock
4786
4786
url = preprocess_url('/testString/_design/testString')
4787
- mock_response = '{"_attachments": {"mapKey": {"content_type": "content_type", "data": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "digest": "digest", "encoded_length": 0, "encoding": "encoding", "follows": false, "length": 0, "revpos": 1, "stub": true}}, "_conflicts": ["conflicts"], "_deleted": true, "_deleted_conflicts": ["deleted_conflicts"], "_id": "_id", "_local_seq": "_local_seq", "_rev": "_rev", "_revisions": {"ids": ["ids"], "start": 1}, "_revs_info": [{"rev": "rev", "status": "available"}], "autoupdate": true, "filters": {"mapKey": "inner"}, "indexes": {"mapKey": {"analyzer": {"name": "classic", "stopwords": ["stopwords"], "fields": {"mapKey": {"name": "classic", "stopwords": ["stopwords"]}}}, "index": "index"}}, "language": "javascript", "options": {"partitioned": false}, "validate_doc_update": "validate_doc_update", "views": {"mapKey": {"map": "map", "options": {}, " reduce": "reduce"}}}'
4787
+ mock_response = '{"_attachments": {"mapKey": {"content_type": "content_type", "data": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "digest": "digest", "encoded_length": 0, "encoding": "encoding", "follows": false, "length": 0, "revpos": 1, "stub": true}}, "_conflicts": ["conflicts"], "_deleted": true, "_deleted_conflicts": ["deleted_conflicts"], "_id": "_id", "_local_seq": "_local_seq", "_rev": "_rev", "_revisions": {"ids": ["ids"], "start": 1}, "_revs_info": [{"rev": "rev", "status": "available"}], "autoupdate": true, "filters": {"mapKey": "inner"}, "indexes": {"mapKey": {"analyzer": {"name": "classic", "stopwords": ["stopwords"], "fields": {"mapKey": {"name": "classic", "stopwords": ["stopwords"]}}}, "index": "index"}}, "language": "javascript", "options": {"partitioned": false}, "validate_doc_update": "validate_doc_update", "views": {"mapKey": {"map": "map", "reduce": "reduce"}}}'
4788
4788
responses.add(
4789
4789
responses.GET,
4790
4790
url,
@@ -4824,7 +4824,7 @@ def test_get_design_document_value_error(self):
4824
4824
"""
4825
4825
# Set up mock
4826
4826
url = preprocess_url('/testString/_design/testString')
4827
- mock_response = '{"_attachments": {"mapKey": {"content_type": "content_type", "data": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "digest": "digest", "encoded_length": 0, "encoding": "encoding", "follows": false, "length": 0, "revpos": 1, "stub": true}}, "_conflicts": ["conflicts"], "_deleted": true, "_deleted_conflicts": ["deleted_conflicts"], "_id": "_id", "_local_seq": "_local_seq", "_rev": "_rev", "_revisions": {"ids": ["ids"], "start": 1}, "_revs_info": [{"rev": "rev", "status": "available"}], "autoupdate": true, "filters": {"mapKey": "inner"}, "indexes": {"mapKey": {"analyzer": {"name": "classic", "stopwords": ["stopwords"], "fields": {"mapKey": {"name": "classic", "stopwords": ["stopwords"]}}}, "index": "index"}}, "language": "javascript", "options": {"partitioned": false}, "validate_doc_update": "validate_doc_update", "views": {"mapKey": {"map": "map", "options": {}, " reduce": "reduce"}}}'
4827
+ mock_response = '{"_attachments": {"mapKey": {"content_type": "content_type", "data": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "digest": "digest", "encoded_length": 0, "encoding": "encoding", "follows": false, "length": 0, "revpos": 1, "stub": true}}, "_conflicts": ["conflicts"], "_deleted": true, "_deleted_conflicts": ["deleted_conflicts"], "_id": "_id", "_local_seq": "_local_seq", "_rev": "_rev", "_revisions": {"ids": ["ids"], "start": 1}, "_revs_info": [{"rev": "rev", "status": "available"}], "autoupdate": true, "filters": {"mapKey": "inner"}, "indexes": {"mapKey": {"analyzer": {"name": "classic", "stopwords": ["stopwords"], "fields": {"mapKey": {"name": "classic", "stopwords": ["stopwords"]}}}, "index": "index"}}, "language": "javascript", "options": {"partitioned": false}, "validate_doc_update": "validate_doc_update", "views": {"mapKey": {"map": "map", "reduce": "reduce"}}}'
4828
4828
responses.add(
4829
4829
responses.GET,
4830
4830
url,
@@ -4920,14 +4920,9 @@ def test_put_design_document_all_params(self):
4920
4920
design_document_options_model = {}
4921
4921
design_document_options_model['partitioned'] = True
4922
4922
4923
- # Construct a dict representation of a DesignDocumentViewsMapReduceOptions model
4924
- design_document_views_map_reduce_options_model = {}
4925
- design_document_views_map_reduce_options_model['foo'] = 'testString'
4926
-
4927
4923
# Construct a dict representation of a DesignDocumentViewsMapReduce model
4928
4924
design_document_views_map_reduce_model = {}
4929
4925
design_document_views_map_reduce_model['map'] = 'function(doc) { \n emit(doc.productid, [doc.brand, doc.name, doc.description]) \n}'
4930
- design_document_views_map_reduce_model['options'] = design_document_views_map_reduce_options_model
4931
4926
design_document_views_map_reduce_model['reduce'] = 'testString'
4932
4927
4933
4928
# Construct a dict representation of a DesignDocument model
@@ -5055,14 +5050,9 @@ def test_put_design_document_required_params(self):
5055
5050
design_document_options_model = {}
5056
5051
design_document_options_model['partitioned'] = True
5057
5052
5058
- # Construct a dict representation of a DesignDocumentViewsMapReduceOptions model
5059
- design_document_views_map_reduce_options_model = {}
5060
- design_document_views_map_reduce_options_model['foo'] = 'testString'
5061
-
5062
5053
# Construct a dict representation of a DesignDocumentViewsMapReduce model
5063
5054
design_document_views_map_reduce_model = {}
5064
5055
design_document_views_map_reduce_model['map'] = 'function(doc) { \n emit(doc.productid, [doc.brand, doc.name, doc.description]) \n}'
5065
- design_document_views_map_reduce_model['options'] = design_document_views_map_reduce_options_model
5066
5056
design_document_views_map_reduce_model['reduce'] = 'testString'
5067
5057
5068
5058
# Construct a dict representation of a DesignDocument model
@@ -5176,14 +5166,9 @@ def test_put_design_document_value_error(self):
5176
5166
design_document_options_model = {}
5177
5167
design_document_options_model['partitioned'] = True
5178
5168
5179
- # Construct a dict representation of a DesignDocumentViewsMapReduceOptions model
5180
- design_document_views_map_reduce_options_model = {}
5181
- design_document_views_map_reduce_options_model['foo'] = 'testString'
5182
-
5183
5169
# Construct a dict representation of a DesignDocumentViewsMapReduce model
5184
5170
design_document_views_map_reduce_model = {}
5185
5171
design_document_views_map_reduce_model['map'] = 'function(doc) { \n emit(doc.productid, [doc.brand, doc.name, doc.description]) \n}'
5186
- design_document_views_map_reduce_model['options'] = design_document_views_map_reduce_options_model
5187
5172
design_document_views_map_reduce_model['reduce'] = 'testString'
5188
5173
5189
5174
# Construct a dict representation of a DesignDocument model
@@ -14653,12 +14638,8 @@ def test_design_document_serialization(self):
14653
14638
design_document_options_model = {} # DesignDocumentOptions
14654
14639
design_document_options_model['partitioned'] = True
14655
14640
14656
- design_document_views_map_reduce_options_model = {} # DesignDocumentViewsMapReduceOptions
14657
- design_document_views_map_reduce_options_model['foo'] = 'testString'
14658
-
14659
14641
design_document_views_map_reduce_model = {} # DesignDocumentViewsMapReduce
14660
14642
design_document_views_map_reduce_model['map'] = 'testString'
14661
- design_document_views_map_reduce_model['options'] = design_document_views_map_reduce_options_model
14662
14643
design_document_views_map_reduce_model['reduce'] = 'testString'
14663
14644
14664
14645
# Construct a json representation of a DesignDocument model
@@ -14851,15 +14832,9 @@ def test_design_document_views_map_reduce_serialization(self):
14851
14832
Test serialization/deserialization for DesignDocumentViewsMapReduce
14852
14833
"""
14853
14834
14854
- # Construct dict forms of any model objects needed in order to build this model.
14855
-
14856
- design_document_views_map_reduce_options_model = {} # DesignDocumentViewsMapReduceOptions
14857
- design_document_views_map_reduce_options_model['foo'] = 'testString'
14858
-
14859
14835
# Construct a json representation of a DesignDocumentViewsMapReduce model
14860
14836
design_document_views_map_reduce_model_json = {}
14861
14837
design_document_views_map_reduce_model_json['map'] = 'testString'
14862
- design_document_views_map_reduce_model_json['options'] = design_document_views_map_reduce_options_model
14863
14838
design_document_views_map_reduce_model_json['reduce'] = 'testString'
14864
14839
14865
14840
# Construct a model instance of DesignDocumentViewsMapReduce by calling from_dict on the json representation
@@ -14878,46 +14853,6 @@ def test_design_document_views_map_reduce_serialization(self):
14878
14853
assert design_document_views_map_reduce_model_json2 == design_document_views_map_reduce_model_json
14879
14854
14880
14855
14881
- class TestModel_DesignDocumentViewsMapReduceOptions:
14882
- """
14883
- Test Class for DesignDocumentViewsMapReduceOptions
14884
- """
14885
-
14886
- def test_design_document_views_map_reduce_options_serialization(self):
14887
- """
14888
- Test serialization/deserialization for DesignDocumentViewsMapReduceOptions
14889
- """
14890
-
14891
- # Construct a json representation of a DesignDocumentViewsMapReduceOptions model
14892
- design_document_views_map_reduce_options_model_json = {}
14893
- design_document_views_map_reduce_options_model_json['foo'] = 'testString'
14894
-
14895
- # Construct a model instance of DesignDocumentViewsMapReduceOptions by calling from_dict on the json representation
14896
- design_document_views_map_reduce_options_model = DesignDocumentViewsMapReduceOptions.from_dict(design_document_views_map_reduce_options_model_json)
14897
- assert design_document_views_map_reduce_options_model != False
14898
-
14899
- # Construct a model instance of DesignDocumentViewsMapReduceOptions by calling from_dict on the json representation
14900
- design_document_views_map_reduce_options_model_dict = DesignDocumentViewsMapReduceOptions.from_dict(design_document_views_map_reduce_options_model_json).__dict__
14901
- design_document_views_map_reduce_options_model2 = DesignDocumentViewsMapReduceOptions(**design_document_views_map_reduce_options_model_dict)
14902
-
14903
- # Verify the model instances are equivalent
14904
- assert design_document_views_map_reduce_options_model == design_document_views_map_reduce_options_model2
14905
-
14906
- # Convert model instance back to dict and verify no loss of data
14907
- design_document_views_map_reduce_options_model_json2 = design_document_views_map_reduce_options_model.to_dict()
14908
- assert design_document_views_map_reduce_options_model_json2 == design_document_views_map_reduce_options_model_json
14909
-
14910
- # Test get_properties and set_properties methods.
14911
- design_document_views_map_reduce_options_model.set_properties({})
14912
- actual_dict = design_document_views_map_reduce_options_model.get_properties()
14913
- assert actual_dict == {}
14914
-
14915
- expected_dict = {'foo': 'testString'}
14916
- design_document_views_map_reduce_options_model.set_properties(expected_dict)
14917
- actual_dict = design_document_views_map_reduce_options_model.get_properties()
14918
- assert actual_dict.keys() == expected_dict.keys()
14919
-
14920
-
14921
14856
class TestModel_DocsResultRow:
14922
14857
"""
14923
14858
Test Class for DocsResultRow
0 commit comments