pulp_certguard_client 0.1.0rc3.dev01581432076

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pulp_certguard_client might be problematic. Click here for more details.

@@ -0,0 +1,247 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.2
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpCertguardClient
16
+ class InlineResponse200
17
+ attr_accessor :count
18
+
19
+ attr_accessor :_next
20
+
21
+ attr_accessor :previous
22
+
23
+ attr_accessor :results
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'count' => :'count',
29
+ :'_next' => :'next',
30
+ :'previous' => :'previous',
31
+ :'results' => :'results'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'count' => :'Integer',
39
+ :'_next' => :'String',
40
+ :'previous' => :'String',
41
+ :'results' => :'Array<CertguardX509CertGuard>'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ :'_next',
49
+ :'previous',
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpCertguardClient::InlineResponse200` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpCertguardClient::InlineResponse200`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'count')
69
+ self.count = attributes[:'count']
70
+ end
71
+
72
+ if attributes.key?(:'_next')
73
+ self._next = attributes[:'_next']
74
+ end
75
+
76
+ if attributes.key?(:'previous')
77
+ self.previous = attributes[:'previous']
78
+ end
79
+
80
+ if attributes.key?(:'results')
81
+ if (value = attributes[:'results']).is_a?(Array)
82
+ self.results = value
83
+ end
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ invalid_properties = Array.new
91
+ if @count.nil?
92
+ invalid_properties.push('invalid value for "count", count cannot be nil.')
93
+ end
94
+
95
+ if @results.nil?
96
+ invalid_properties.push('invalid value for "results", results cannot be nil.')
97
+ end
98
+
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ return false if @count.nil?
106
+ return false if @results.nil?
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ count == o.count &&
116
+ _next == o._next &&
117
+ previous == o.previous &&
118
+ results == o.results
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [count, _next, previous, results].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ new.build_from_hash(attributes)
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ self.class.openapi_types.each_pair do |key, type|
146
+ if type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
150
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
151
+ end
152
+ elsif !attributes[self.class.attribute_map[key]].nil?
153
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
155
+ end
156
+
157
+ self
158
+ end
159
+
160
+ # Deserializes the data based on type
161
+ # @param string type Data type
162
+ # @param string value Value to be deserialized
163
+ # @return [Object] Deserialized data
164
+ def _deserialize(type, value)
165
+ case type.to_sym
166
+ when :DateTime
167
+ DateTime.parse(value)
168
+ when :Date
169
+ Date.parse(value)
170
+ when :String
171
+ value.to_s
172
+ when :Integer
173
+ value.to_i
174
+ when :Float
175
+ value.to_f
176
+ when :Boolean
177
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
178
+ true
179
+ else
180
+ false
181
+ end
182
+ when :Object
183
+ # generic object (usually a Hash), return directly
184
+ value
185
+ when /\AArray<(?<inner_type>.+)>\z/
186
+ inner_type = Regexp.last_match[:inner_type]
187
+ value.map { |v| _deserialize(inner_type, v) }
188
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
189
+ k_type = Regexp.last_match[:k_type]
190
+ v_type = Regexp.last_match[:v_type]
191
+ {}.tap do |hash|
192
+ value.each do |k, v|
193
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
194
+ end
195
+ end
196
+ else # model
197
+ PulpCertguardClient.const_get(type).build_from_hash(value)
198
+ end
199
+ end
200
+
201
+ # Returns the string representation of the object
202
+ # @return [String] String presentation of the object
203
+ def to_s
204
+ to_hash.to_s
205
+ end
206
+
207
+ # to_body is an alias to to_hash (backward compatibility)
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_body
210
+ to_hash
211
+ end
212
+
213
+ # Returns the object in the form of hash
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_hash
216
+ hash = {}
217
+ self.class.attribute_map.each_pair do |attr, param|
218
+ value = self.send(attr)
219
+ if value.nil?
220
+ is_nullable = self.class.openapi_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ # Outputs non-array value in the form of hash
230
+ # For object, use to_hash. Otherwise, just return the value
231
+ # @param [Object] value Any valid value
232
+ # @return [Hash] Returns the value in the form of hash
233
+ def _to_hash(value)
234
+ if value.is_a?(Array)
235
+ value.compact.map { |v| _to_hash(v) }
236
+ elsif value.is_a?(Hash)
237
+ {}.tap do |hash|
238
+ value.each { |k, v| hash[k] = _to_hash(v) }
239
+ end
240
+ elsif value.respond_to? :to_hash
241
+ value.to_hash
242
+ else
243
+ value
244
+ end
245
+ end
246
+ end
247
+ end
@@ -0,0 +1,15 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.2
10
+
11
+ =end
12
+
13
+ module PulpCertguardClient
14
+ VERSION = '0.1.0rc3.dev01581432076'
15
+ end
@@ -0,0 +1,39 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #Pulp 3 API
5
+
6
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v3
9
+
10
+ Generated by: https://openapi-generator.tech
11
+ OpenAPI Generator version: 4.2.2
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "pulp_certguard_client/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "pulp_certguard_client"
20
+ s.version = PulpCertguardClient::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["OpenAPI-Generator"]
23
+ s.email = [""]
24
+ s.homepage = "https://openapi-generator.tech"
25
+ s.summary = "Pulp 3 API Ruby Gem"
26
+ s.description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)"
27
+ s.license = 'GPL-2.0+'
28
+ s.required_ruby_version = ">= 1.9"
29
+
30
+ s.add_runtime_dependency 'faraday', '>= 0.14.0'
31
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
+
35
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
36
+ s.test_files = `find spec/*`.split("\n")
37
+ s.executables = []
38
+ s.require_paths = ["lib"]
39
+ end
@@ -0,0 +1,122 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.2
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for PulpCertguardClient::ContentguardsX509Api
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'ContentguardsX509Api' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = PulpCertguardClient::ContentguardsX509Api.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of ContentguardsX509Api' do
30
+ it 'should create an instance of ContentguardsX509Api' do
31
+ expect(@api_instance).to be_instance_of(PulpCertguardClient::ContentguardsX509Api)
32
+ end
33
+ end
34
+
35
+ # unit tests for create
36
+ # Create a x509 cert guard
37
+ # X509CertGuard API Viewsets.
38
+ # @param name The unique name.
39
+ # @param ca_certificate The Certificate Authority (CA) certificate.
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [String] :description An optional description.
42
+ # @return [CertguardX509CertGuard]
43
+ describe 'create test' do
44
+ it 'should work' do
45
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
46
+ end
47
+ end
48
+
49
+ # unit tests for delete
50
+ # Delete a x509 cert guard
51
+ # X509CertGuard API Viewsets.
52
+ # @param x509_cert_guard_href URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
53
+ # @param [Hash] opts the optional parameters
54
+ # @return [nil]
55
+ describe 'delete test' do
56
+ it 'should work' do
57
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
+ end
59
+ end
60
+
61
+ # unit tests for list
62
+ # List x509 cert guards
63
+ # X509CertGuard API Viewsets.
64
+ # @param [Hash] opts the optional parameters
65
+ # @option opts [String] :name
66
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
67
+ # @option opts [Integer] :limit Number of results to return per page.
68
+ # @option opts [Integer] :offset The initial index from which to return the results.
69
+ # @option opts [String] :fields A list of fields to include in the response.
70
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
71
+ # @return [InlineResponse200]
72
+ describe 'list test' do
73
+ it 'should work' do
74
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
75
+ end
76
+ end
77
+
78
+ # unit tests for partial_update
79
+ # Partially update a x509 cert guard
80
+ # X509CertGuard API Viewsets.
81
+ # @param x509_cert_guard_href URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
82
+ # @param name The unique name.
83
+ # @param ca_certificate The Certificate Authority (CA) certificate.
84
+ # @param [Hash] opts the optional parameters
85
+ # @option opts [String] :description An optional description.
86
+ # @return [CertguardX509CertGuard]
87
+ describe 'partial_update test' do
88
+ it 'should work' do
89
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
90
+ end
91
+ end
92
+
93
+ # unit tests for read
94
+ # Inspect a x509 cert guard
95
+ # X509CertGuard API Viewsets.
96
+ # @param x509_cert_guard_href URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
97
+ # @param [Hash] opts the optional parameters
98
+ # @option opts [String] :fields A list of fields to include in the response.
99
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
100
+ # @return [CertguardX509CertGuard]
101
+ describe 'read test' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
107
+ # unit tests for update
108
+ # Update a x509 cert guard
109
+ # X509CertGuard API Viewsets.
110
+ # @param x509_cert_guard_href URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
111
+ # @param name The unique name.
112
+ # @param ca_certificate The Certificate Authority (CA) certificate.
113
+ # @param [Hash] opts the optional parameters
114
+ # @option opts [String] :description An optional description.
115
+ # @return [CertguardX509CertGuard]
116
+ describe 'update test' do
117
+ it 'should work' do
118
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
119
+ end
120
+ end
121
+
122
+ end
@@ -0,0 +1,188 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.2
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+
15
+ describe PulpCertguardClient::ApiClient do
16
+ context 'initialization' do
17
+ context 'URL stuff' do
18
+ context 'host' do
19
+ it 'removes http from host' do
20
+ PulpCertguardClient.configure { |c| c.host = 'http://example.com' }
21
+ expect(PulpCertguardClient::Configuration.default.host).to eq('example.com')
22
+ end
23
+
24
+ it 'removes https from host' do
25
+ PulpCertguardClient.configure { |c| c.host = 'https://wookiee.com' }
26
+ expect(PulpCertguardClient::ApiClient.default.config.host).to eq('wookiee.com')
27
+ end
28
+
29
+ it 'removes trailing path from host' do
30
+ PulpCertguardClient.configure { |c| c.host = 'hobo.com/v4' }
31
+ expect(PulpCertguardClient::Configuration.default.host).to eq('hobo.com')
32
+ end
33
+ end
34
+
35
+ context 'base_path' do
36
+ it "prepends a slash to base_path" do
37
+ PulpCertguardClient.configure { |c| c.base_path = 'v4/dog' }
38
+ expect(PulpCertguardClient::Configuration.default.base_path).to eq('/v4/dog')
39
+ end
40
+
41
+ it "doesn't prepend a slash if one is already there" do
42
+ PulpCertguardClient.configure { |c| c.base_path = '/v4/dog' }
43
+ expect(PulpCertguardClient::Configuration.default.base_path).to eq('/v4/dog')
44
+ end
45
+
46
+ it "ends up as a blank string if nil" do
47
+ PulpCertguardClient.configure { |c| c.base_path = nil }
48
+ expect(PulpCertguardClient::Configuration.default.base_path).to eq('')
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ describe '#deserialize' do
55
+ it "handles Array<Integer>" do
56
+ api_client = PulpCertguardClient::ApiClient.new
57
+ headers = { 'Content-Type' => 'application/json' }
58
+ response = double('response', headers: headers, body: '[12, 34]')
59
+ data = api_client.deserialize(response, 'Array<Integer>')
60
+ expect(data).to be_instance_of(Array)
61
+ expect(data).to eq([12, 34])
62
+ end
63
+
64
+ it 'handles Array<Array<Integer>>' do
65
+ api_client = PulpCertguardClient::ApiClient.new
66
+ headers = { 'Content-Type' => 'application/json' }
67
+ response = double('response', headers: headers, body: '[[12, 34], [56]]')
68
+ data = api_client.deserialize(response, 'Array<Array<Integer>>')
69
+ expect(data).to be_instance_of(Array)
70
+ expect(data).to eq([[12, 34], [56]])
71
+ end
72
+
73
+ it 'handles Hash<String, String>' do
74
+ api_client = PulpCertguardClient::ApiClient.new
75
+ headers = { 'Content-Type' => 'application/json' }
76
+ response = double('response', headers: headers, body: '{"message": "Hello"}')
77
+ data = api_client.deserialize(response, 'Hash<String, String>')
78
+ expect(data).to be_instance_of(Hash)
79
+ expect(data).to eq(:message => 'Hello')
80
+ end
81
+ end
82
+
83
+ describe "#object_to_hash" do
84
+ it 'ignores nils and includes empty arrays' do
85
+ # uncomment below to test object_to_hash for model
86
+ # api_client = PulpCertguardClient::ApiClient.new
87
+ # _model = PulpCertguardClient::ModelName.new
88
+ # update the model attribute below
89
+ # _model.id = 1
90
+ # update the expected value (hash) below
91
+ # expected = {id: 1, name: '', tags: []}
92
+ # expect(api_client.object_to_hash(_model)).to eq(expected)
93
+ end
94
+ end
95
+
96
+ describe '#build_collection_param' do
97
+ let(:param) { ['aa', 'bb', 'cc'] }
98
+ let(:api_client) { PulpCertguardClient::ApiClient.new }
99
+
100
+ it 'works for csv' do
101
+ expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
102
+ end
103
+
104
+ it 'works for ssv' do
105
+ expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
106
+ end
107
+
108
+ it 'works for tsv' do
109
+ expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
110
+ end
111
+
112
+ it 'works for pipes' do
113
+ expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
114
+ end
115
+
116
+ it 'works for multi' do
117
+ expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
118
+ end
119
+
120
+ it 'fails for invalid collection format' do
121
+ expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
122
+ end
123
+ end
124
+
125
+ describe '#json_mime?' do
126
+ let(:api_client) { PulpCertguardClient::ApiClient.new }
127
+
128
+ it 'works' do
129
+ expect(api_client.json_mime?(nil)).to eq false
130
+ expect(api_client.json_mime?('')).to eq false
131
+
132
+ expect(api_client.json_mime?('application/json')).to eq true
133
+ expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
134
+ expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
135
+
136
+ expect(api_client.json_mime?('application/xml')).to eq false
137
+ expect(api_client.json_mime?('text/plain')).to eq false
138
+ expect(api_client.json_mime?('application/jsonp')).to eq false
139
+ end
140
+ end
141
+
142
+ describe '#select_header_accept' do
143
+ let(:api_client) { PulpCertguardClient::ApiClient.new }
144
+
145
+ it 'works' do
146
+ expect(api_client.select_header_accept(nil)).to be_nil
147
+ expect(api_client.select_header_accept([])).to be_nil
148
+
149
+ expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
150
+ expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
151
+ expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
152
+
153
+ expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
154
+ expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
155
+ end
156
+ end
157
+
158
+ describe '#select_header_content_type' do
159
+ let(:api_client) { PulpCertguardClient::ApiClient.new }
160
+
161
+ it 'works' do
162
+ expect(api_client.select_header_content_type(nil)).to eq('application/json')
163
+ expect(api_client.select_header_content_type([])).to eq('application/json')
164
+
165
+ expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
166
+ expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
167
+ expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
168
+ expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
169
+ expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
170
+ end
171
+ end
172
+
173
+ describe '#sanitize_filename' do
174
+ let(:api_client) { PulpCertguardClient::ApiClient.new }
175
+
176
+ it 'works' do
177
+ expect(api_client.sanitize_filename('sun')).to eq('sun')
178
+ expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
179
+ expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
180
+ expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
181
+ expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
182
+ expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
183
+ expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
184
+ expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
185
+ expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
186
+ end
187
+ end
188
+ end