@@ -101,7 +101,9 @@ def test_get(self):
101
101
102
102
def test_get_fields_space (self ):
103
103
self .client .get .return_value = self .mock_response (
104
- "/v3/service_instances/service_instance_id?fields[space]=guid,name,relationships.organization&fields[space.organization]=guid,name" ,
104
+ "/v3/service_instances/service_instance_id"
105
+ "?fields[space]=guid,name,relationships.organization"
106
+ "&fields[space.organization]=guid,name" ,
105
107
HTTPStatus .OK ,
106
108
None ,
107
109
"v3" ,
@@ -111,15 +113,17 @@ def test_get_fields_space(self):
111
113
fields = {
112
114
"space" : ["guid,name,relationships.organization" ],
113
115
"space.organization" : ["guid" , "name" ],
114
- }
116
+ }
115
117
space = self .client .v3 .service_instances .get ("service_instance_id" , fields = fields ).space ()
116
118
self .client .get .assert_called_with (self .client .get .return_value .url )
117
119
self .assertEqual ("my_space" , space ["name" ])
118
120
self .assertIsInstance (space , Entity )
119
121
120
122
def test_list_fields_space_and_org (self ):
121
123
self .client .get .return_value = self .mock_response (
122
- "/v3/service_instances?fields[space]=guid,name,relationships.organization&fields[space.organization]=guid,name" ,
124
+ "/v3/service_instances"
125
+ "?fields[space]=guid,name,relationships.organization"
126
+ "&fields[space.organization]=guid,name" ,
123
127
HTTPStatus .OK ,
124
128
None ,
125
129
"v3" ,
@@ -128,8 +132,8 @@ def test_list_fields_space_and_org(self):
128
132
)
129
133
fields = {
130
134
"space" : ["guid,name,relationships.organization" ],
131
- "space.organization" : ["guid" ,"name" ]
132
- }
135
+ "space.organization" : ["guid" , "name" ]
136
+ }
133
137
all_spaces = [app .space () for app in self .client .v3 .service_instances .list (fields = fields )]
134
138
self .client .get .assert_called_with (self .client .get .return_value .url )
135
139
self .assertEqual (2 , len (all_spaces ))
0 commit comments