Skip to content

Commit 7e4204b

Browse files
committed
[python] add tunnelOwner option
1 parent 7a6f119 commit 7e4204b

File tree

9 files changed

+52
-0
lines changed

9 files changed

+52
-0
lines changed

python/saucebindings/configs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class Configs:
77
'custom_data': 'customData',
88
'public': 'public',
99
'tunnel_identifier': 'tunnelIdentifier',
10+
'tunnel_owner': 'tunnelOwner',
1011
'parent_tunnel': 'parentTunnel'
1112
}
1213

python/saucebindings/options.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
'tags': 'tags',
4444
'time_zone': 'timeZone',
4545
'tunnel_identifier': 'tunnelIdentifier',
46+
'tunnel_owner': 'tunnelOwner',
4647
'video_upload_on_pass': 'videoUploadOnPass',
4748
'capture_performance': 'capturePerformance'
4849
}

python/tests/options.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ exampleValues:
4343
- foobar
4444
timeZone: 'San Francisco'
4545
tunnelIdentifier: 'tunnelname'
46+
tunnelOwner: 'tunnelowner'
4647
videoUploadOnPass: false
4748

4849
invalidOption:

python/tests/unit/test_chrome.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def test_accepts_sauce_values_with_dict(self):
8787
'tags': ['foo', 'bar'],
8888
'timeZone': 'Foo',
8989
'tunnelIdentifier': 'foobar',
90+
'tunnelOwner': 'baz',
9091
'videoUploadOnPass': False}
9192

9293
sauce = SauceOptions.chrome(**options)
@@ -115,6 +116,7 @@ def test_accepts_sauce_values_with_dict(self):
115116
assert sauce.tags == ['foo', 'bar']
116117
assert sauce.time_zone == 'Foo'
117118
assert sauce.tunnel_identifier == 'foobar'
119+
assert sauce.tunnel_owner == 'baz'
118120
assert sauce.video_upload_on_pass is False
119121

120122
def test_accepts_sauce_values_as_params(self):
@@ -144,6 +146,7 @@ def test_accepts_sauce_values_as_params(self):
144146
tags=['foo', 'bar'],
145147
timeZone='Foo',
146148
tunnelIdentifier='foobar',
149+
tunnelOwner='baz',
147150
videoUploadOnPass=False)
148151

149152
assert sauce.build == 'bar'
@@ -170,6 +173,7 @@ def test_accepts_sauce_values_as_params(self):
170173
assert sauce.tags == ['foo', 'bar']
171174
assert sauce.time_zone == 'Foo'
172175
assert sauce.tunnel_identifier == 'foobar'
176+
assert sauce.tunnel_owner == 'baz'
173177
assert sauce.video_upload_on_pass is False
174178

175179
def test_accepts_selenium_browser_options_instance(self):
@@ -282,6 +286,7 @@ def test_sauce_options(self):
282286
options.tags = tags
283287
options.time_zone = 'San Francisco'
284288
options.tunnel_identifier = 'tunnelname'
289+
options.tunnel_owner = 'tunnelowner'
285290
options.video_upload_on_pass = False
286291

287292
assert options.build == 'Sample Build Name'
@@ -304,6 +309,7 @@ def test_sauce_options(self):
304309
assert options.tags == tags
305310
assert options.time_zone == 'San Francisco'
306311
assert options.tunnel_identifier == 'tunnelname'
312+
assert options.tunnel_owner == 'tunnelowner'
307313
assert options.video_upload_on_pass is False
308314

309315
def test_setting_browser_name(self):
@@ -384,6 +390,7 @@ def test_capabilities_for_sauce(self):
384390
options.tags = tags
385391
options.time_zone = 'San Francisco'
386392
options.tunnel_identifier = 'tunnelname'
393+
options.tunnel_owner = 'tunnelowner'
387394
options.video_upload_on_pass = False
388395

389396
expected_capabilities = {'browserName': 'chrome',
@@ -410,6 +417,7 @@ def test_capabilities_for_sauce(self):
410417
'tags': ['foo', 'bar'],
411418
'timeZone': 'San Francisco',
412419
'tunnelIdentifier': 'tunnelname',
420+
'tunnelOwner': 'tunnelowner',
413421
'videoUploadOnPass': False,
414422
'username': os.getenv('SAUCE_USERNAME'),
415423
'accessKey': os.getenv('SAUCE_ACCESS_KEY')}}

python/tests/unit/test_edge.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def test_accepts_sauce_values_with_dict(self):
8484
'tags': ['foo', 'bar'],
8585
'timeZone': 'Foo',
8686
'tunnelIdentifier': 'foobar',
87+
'tunnelOwner': 'baz',
8788
'videoUploadOnPass': False}
8889

8990
sauce = SauceOptions.edge(**options)
@@ -110,6 +111,7 @@ def test_accepts_sauce_values_with_dict(self):
110111
assert sauce.tags == ['foo', 'bar']
111112
assert sauce.time_zone == 'Foo'
112113
assert sauce.tunnel_identifier == 'foobar'
114+
assert sauce.tunnel_owner == 'baz'
113115
assert sauce.video_upload_on_pass is False
114116

115117
def test_accepts_sauce_values_as_params(self):
@@ -137,6 +139,7 @@ def test_accepts_sauce_values_as_params(self):
137139
tags=['foo', 'bar'],
138140
timeZone='Foo',
139141
tunnelIdentifier='foobar',
142+
tunnelOwner='baz',
140143
videoUploadOnPass=False)
141144

142145
assert sauce.build == 'bar'
@@ -161,6 +164,7 @@ def test_accepts_sauce_values_as_params(self):
161164
assert sauce.tags == ['foo', 'bar']
162165
assert sauce.time_zone == 'Foo'
163166
assert sauce.tunnel_identifier == 'foobar'
167+
assert sauce.tunnel_owner == 'baz'
164168
assert sauce.video_upload_on_pass is False
165169

166170
def test_accepts_selenium_browser_options_instance(self):
@@ -271,6 +275,7 @@ def test_sauce_options(self):
271275
options.tags = tags
272276
options.time_zone = 'San Francisco'
273277
options.tunnel_identifier = 'tunnelname'
278+
options.tunnel_owner = 'tunnelowner'
274279
options.video_upload_on_pass = False
275280

276281
assert options.build == 'Sample Build Name'
@@ -291,6 +296,7 @@ def test_sauce_options(self):
291296
assert options.tags == tags
292297
assert options.time_zone == 'San Francisco'
293298
assert options.tunnel_identifier == 'tunnelname'
299+
assert options.tunnel_owner == 'tunnelowner'
294300
assert options.video_upload_on_pass is False
295301

296302
def test_setting_browser_name(self):
@@ -369,6 +375,7 @@ def test_capabilities_for_sauce(self):
369375
options.tags = tags
370376
options.time_zone = 'San Francisco'
371377
options.tunnel_identifier = 'tunnelname'
378+
options.tunnel_owner = 'tunnelowner'
372379
options.video_upload_on_pass = False
373380

374381
expected_capabilities = {'browserName': 'MicrosoftEdge',
@@ -393,6 +400,7 @@ def test_capabilities_for_sauce(self):
393400
'tags': ['foo', 'bar'],
394401
'timeZone': 'San Francisco',
395402
'tunnelIdentifier': 'tunnelname',
403+
'tunnelOwner': 'tunnelowner',
396404
'videoUploadOnPass': False,
397405
'username': os.getenv('SAUCE_USERNAME'),
398406
'accessKey': os.getenv('SAUCE_ACCESS_KEY')}}

python/tests/unit/test_firefox.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def test_accepts_sauce_values_with_dict(self):
8787
'tags': ['foo', 'bar'],
8888
'timeZone': 'Foo',
8989
'tunnelIdentifier': 'foobar',
90+
'tunnelOwner': 'baz',
9091
'videoUploadOnPass': False}
9192

9293
sauce = SauceOptions.firefox(**options)
@@ -114,6 +115,7 @@ def test_accepts_sauce_values_with_dict(self):
114115
assert sauce.tags == ['foo', 'bar']
115116
assert sauce.time_zone == 'Foo'
116117
assert sauce.tunnel_identifier == 'foobar'
118+
assert sauce.tunnel_owner == 'baz'
117119
assert sauce.video_upload_on_pass is False
118120

119121
def test_accepts_sauce_values_as_params(self):
@@ -142,6 +144,7 @@ def test_accepts_sauce_values_as_params(self):
142144
tags=['foo', 'bar'],
143145
timeZone='Foo',
144146
tunnelIdentifier='foobar',
147+
tunnelOwner='baz',
145148
videoUploadOnPass=False)
146149

147150
assert sauce.build == 'bar'
@@ -167,6 +170,7 @@ def test_accepts_sauce_values_as_params(self):
167170
assert sauce.tags == ['foo', 'bar']
168171
assert sauce.time_zone == 'Foo'
169172
assert sauce.tunnel_identifier == 'foobar'
173+
assert sauce.tunnel_owner == 'baz'
170174
assert sauce.video_upload_on_pass is False
171175

172176
def test_accepts_selenium_browser_options_instance(self):
@@ -278,6 +282,7 @@ def test_sauce_options(self):
278282
options.tags = tags
279283
options.time_zone = 'San Francisco'
280284
options.tunnel_identifier = 'tunnelname'
285+
options.tunnel_owner = 'tunnelowner'
281286
options.video_upload_on_pass = False
282287

283288
assert options.build == 'Sample Build Name'
@@ -299,6 +304,7 @@ def test_sauce_options(self):
299304
assert options.tags == tags
300305
assert options.time_zone == 'San Francisco'
301306
assert options.tunnel_identifier == 'tunnelname'
307+
assert options.tunnel_owner == 'tunnelowner'
302308
assert options.video_upload_on_pass is False
303309

304310
def test_setting_browser_name(self):
@@ -369,6 +375,7 @@ def test_setting_capabilities(self):
369375
assert options.tags == tags
370376
assert options.time_zone == 'San Francisco'
371377
assert options.tunnel_identifier == 'tunnelname'
378+
assert options.tunnel_owner == 'tunnelowner'
372379
assert options.video_upload_on_pass is False
373380

374381

@@ -436,6 +443,7 @@ def test_capabilities_for_sauce(self):
436443
options.tags = tags
437444
options.time_zone = 'San Francisco'
438445
options.tunnel_identifier = 'tunnelname'
446+
options.tunnel_owner = 'tunnelowner'
439447
options.video_upload_on_pass = False
440448

441449
expected_capabilities = {'browserName': 'firefox',
@@ -461,6 +469,7 @@ def test_capabilities_for_sauce(self):
461469
'tags': ['foo', 'bar'],
462470
'timeZone': 'San Francisco',
463471
'tunnelIdentifier': 'tunnelname',
472+
'tunnelOwner': 'tunnelowner',
464473
'videoUploadOnPass': False,
465474
'username': os.getenv('SAUCE_USERNAME'),
466475
'accessKey': os.getenv('SAUCE_ACCESS_KEY')}}

python/tests/unit/test_ie.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def test_accepts_sauce_values_with_dict(self):
8686
'tags': ['foo', 'bar'],
8787
'timeZone': 'Foo',
8888
'tunnelIdentifier': 'foobar',
89+
'tunnelOwner': 'baz',
8990
'videoUploadOnPass': False}
9091

9192
sauce = SauceOptions.ie(**options)
@@ -113,6 +114,7 @@ def test_accepts_sauce_values_with_dict(self):
113114
assert sauce.tags == ['foo', 'bar']
114115
assert sauce.time_zone == 'Foo'
115116
assert sauce.tunnel_identifier == 'foobar'
117+
assert sauce.tunnel_owner == 'baz'
116118
assert sauce.video_upload_on_pass is False
117119

118120
def test_accepts_sauce_values_as_params(self):
@@ -142,6 +144,7 @@ def test_accepts_sauce_values_as_params(self):
142144
tags=['foo', 'bar'],
143145
timeZone='Foo',
144146
tunnelIdentifier='foobar',
147+
tunnelOwner='baz',
145148
videoUploadOnPass=False)
146149

147150
assert sauce.avoid_proxy is True
@@ -168,6 +171,7 @@ def test_accepts_sauce_values_as_params(self):
168171
assert sauce.tags == ['foo', 'bar']
169172
assert sauce.time_zone == 'Foo'
170173
assert sauce.tunnel_identifier == 'foobar'
174+
assert sauce.tunnel_owner == 'baz'
171175
assert sauce.video_upload_on_pass is False
172176

173177
def test_accepts_selenium_browser_options_instance(self):
@@ -279,6 +283,7 @@ def test_sauce_options(self):
279283
options.tags = tags
280284
options.time_zone = 'San Francisco'
281285
options.tunnel_identifier = 'tunnelname'
286+
options.tunnel_owner = 'tunnelowner'
282287
options.video_upload_on_pass = False
283288

284289
assert options.build == 'Sample Build Name'
@@ -300,6 +305,7 @@ def test_sauce_options(self):
300305
assert options.tags == tags
301306
assert options.time_zone == 'San Francisco'
302307
assert options.tunnel_identifier == 'tunnelname'
308+
assert options.tunnel_owner == 'tunnelowner'
303309
assert options.video_upload_on_pass is False
304310

305311
def test_setting_browser_name(self):
@@ -379,6 +385,7 @@ def test_capabilities_for_sauce(self):
379385
options.tags = tags
380386
options.time_zone = 'San Francisco'
381387
options.tunnel_identifier = 'tunnelname'
388+
options.tunnel_owner = 'tunnelowner'
382389
options.video_upload_on_pass = False
383390

384391
expected_capabilities = {'browserName': 'internet explorer',
@@ -404,6 +411,7 @@ def test_capabilities_for_sauce(self):
404411
'tags': ['foo', 'bar'],
405412
'timeZone': 'San Francisco',
406413
'tunnelIdentifier': 'tunnelname',
414+
'tunnelOwner': 'tunnelowner',
407415
'videoUploadOnPass': False,
408416
'username': os.getenv('SAUCE_USERNAME'),
409417
'accessKey': os.getenv('SAUCE_ACCESS_KEY')}}

python/tests/unit/test_old_options.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def test_accepts_sauce_values_with_dict(self):
9898
'tags': ['foo', 'bar'],
9999
'timeZone': 'Foo',
100100
'tunnelIdentifier': 'foobar',
101+
'tunnelOwner': 'baz',
101102
'videoUploadOnPass': False}
102103

103104
sauce = SauceOptions(**options)
@@ -129,6 +130,7 @@ def test_accepts_sauce_values_with_dict(self):
129130
assert sauce.tags == ['foo', 'bar']
130131
assert sauce.time_zone == 'Foo'
131132
assert sauce.tunnel_identifier == 'foobar'
133+
assert sauce.tunnel_owner == 'baz'
132134
assert sauce.video_upload_on_pass is False
133135

134136
def test_accepts_sauce_values_as_params(self):
@@ -161,6 +163,7 @@ def test_accepts_sauce_values_as_params(self):
161163
tags=['foo', 'bar'],
162164
timeZone='Foo',
163165
tunnelIdentifier='foobar',
166+
tunnelOwner='baz',
164167
videoUploadOnPass=False)
165168

166169
assert sauce.avoid_proxy is True
@@ -190,6 +193,7 @@ def test_accepts_sauce_values_as_params(self):
190193
assert sauce.tags == ['foo', 'bar']
191194
assert sauce.time_zone == 'Foo'
192195
assert sauce.tunnel_identifier == 'foobar'
196+
assert sauce.tunnel_owner == 'baz'
193197
assert sauce.video_upload_on_pass is False
194198

195199
def test_accepts_selenium_browser_options_instance(self):
@@ -308,6 +312,7 @@ def test_sauce_options(self):
308312
options.tags = tags
309313
options.time_zone = 'San Francisco'
310314
options.tunnel_identifier = 'tunnelname'
315+
options.tunnel_owner = 'tunnelowner'
311316
options.video_upload_on_pass = False
312317

313318
assert options.avoid_proxy is True
@@ -387,6 +392,7 @@ def test_setting_capabilities(self):
387392
assert options.tags == tags
388393
assert options.time_zone == 'San Francisco'
389394
assert options.tunnel_identifier == 'tunnelname'
395+
assert options.tunnel_owner == 'tunnelowner'
390396
assert options.video_upload_on_pass is False
391397

392398

@@ -459,6 +465,7 @@ def test_capabilities_for_sauce(self):
459465
options.tags = tags
460466
options.time_zone = 'San Francisco'
461467
options.tunnel_identifier = 'tunnelname'
468+
options.tunnel_owner = 'tunnelowner'
462469
options.video_upload_on_pass = False
463470

464471
expected_capabilities = {'browserName': 'chrome',
@@ -488,6 +495,7 @@ def test_capabilities_for_sauce(self):
488495
'tags': ['foo', 'bar'],
489496
'timeZone': 'San Francisco',
490497
'tunnelIdentifier': 'tunnelname',
498+
'tunnelOwner': 'tunnelowner',
491499
'videoUploadOnPass': False,
492500
'username': os.getenv('SAUCE_USERNAME'),
493501
'accessKey': os.getenv('SAUCE_ACCESS_KEY')}}

0 commit comments

Comments
 (0)