Skip to content

Add tunnelOwner option for python #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python/saucebindings/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class Configs:
'custom_data': 'customData',
'public': 'public',
'tunnel_identifier': 'tunnelIdentifier',
'tunnel_owner': 'tunnelOwner',
'parent_tunnel': 'parentTunnel'
}

Expand Down
1 change: 1 addition & 0 deletions python/saucebindings/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
'tags': 'tags',
'time_zone': 'timeZone',
'tunnel_identifier': 'tunnelIdentifier',
'tunnel_owner': 'tunnelOwner',
'video_upload_on_pass': 'videoUploadOnPass',
'capture_performance': 'capturePerformance'
}
Expand Down
1 change: 1 addition & 0 deletions python/tests/options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ exampleValues:
- foobar
timeZone: 'San Francisco'
tunnelIdentifier: 'tunnelname'
tunnelOwner: 'tunnelowner'
videoUploadOnPass: false

invalidOption:
Expand Down
8 changes: 8 additions & 0 deletions python/tests/unit/test_chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def test_accepts_sauce_values_with_dict(self):
'tags': ['foo', 'bar'],
'timeZone': 'Foo',
'tunnelIdentifier': 'foobar',
'tunnelOwner': 'baz',
'videoUploadOnPass': False}

sauce = SauceOptions.chrome(**options)
Expand Down Expand Up @@ -115,6 +116,7 @@ def test_accepts_sauce_values_with_dict(self):
assert sauce.tags == ['foo', 'bar']
assert sauce.time_zone == 'Foo'
assert sauce.tunnel_identifier == 'foobar'
assert sauce.tunnel_owner == 'baz'
assert sauce.video_upload_on_pass is False

def test_accepts_sauce_values_as_params(self):
Expand Down Expand Up @@ -144,6 +146,7 @@ def test_accepts_sauce_values_as_params(self):
tags=['foo', 'bar'],
timeZone='Foo',
tunnelIdentifier='foobar',
tunnelOwner='baz',
videoUploadOnPass=False)

assert sauce.build == 'bar'
Expand All @@ -170,6 +173,7 @@ def test_accepts_sauce_values_as_params(self):
assert sauce.tags == ['foo', 'bar']
assert sauce.time_zone == 'Foo'
assert sauce.tunnel_identifier == 'foobar'
assert sauce.tunnel_owner == 'baz'
assert sauce.video_upload_on_pass is False

def test_accepts_selenium_browser_options_instance(self):
Expand Down Expand Up @@ -282,6 +286,7 @@ def test_sauce_options(self):
options.tags = tags
options.time_zone = 'San Francisco'
options.tunnel_identifier = 'tunnelname'
options.tunnel_owner = 'tunnelowner'
options.video_upload_on_pass = False

assert options.build == 'Sample Build Name'
Expand All @@ -304,6 +309,7 @@ def test_sauce_options(self):
assert options.tags == tags
assert options.time_zone == 'San Francisco'
assert options.tunnel_identifier == 'tunnelname'
assert options.tunnel_owner == 'tunnelowner'
assert options.video_upload_on_pass is False

def test_setting_browser_name(self):
Expand Down Expand Up @@ -384,6 +390,7 @@ def test_capabilities_for_sauce(self):
options.tags = tags
options.time_zone = 'San Francisco'
options.tunnel_identifier = 'tunnelname'
options.tunnel_owner = 'tunnelowner'
options.video_upload_on_pass = False

expected_capabilities = {'browserName': 'chrome',
Expand All @@ -410,6 +417,7 @@ def test_capabilities_for_sauce(self):
'tags': ['foo', 'bar'],
'timeZone': 'San Francisco',
'tunnelIdentifier': 'tunnelname',
'tunnelOwner': 'tunnelowner',
'videoUploadOnPass': False,
'username': os.getenv('SAUCE_USERNAME'),
'accessKey': os.getenv('SAUCE_ACCESS_KEY')}}
Expand Down
8 changes: 8 additions & 0 deletions python/tests/unit/test_edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def test_accepts_sauce_values_with_dict(self):
'tags': ['foo', 'bar'],
'timeZone': 'Foo',
'tunnelIdentifier': 'foobar',
'tunnelOwner': 'baz',
'videoUploadOnPass': False}

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

def test_accepts_sauce_values_as_params(self):
Expand Down Expand Up @@ -137,6 +139,7 @@ def test_accepts_sauce_values_as_params(self):
tags=['foo', 'bar'],
timeZone='Foo',
tunnelIdentifier='foobar',
tunnelOwner='baz',
videoUploadOnPass=False)

assert sauce.build == 'bar'
Expand All @@ -161,6 +164,7 @@ def test_accepts_sauce_values_as_params(self):
assert sauce.tags == ['foo', 'bar']
assert sauce.time_zone == 'Foo'
assert sauce.tunnel_identifier == 'foobar'
assert sauce.tunnel_owner == 'baz'
assert sauce.video_upload_on_pass is False

def test_accepts_selenium_browser_options_instance(self):
Expand Down Expand Up @@ -271,6 +275,7 @@ def test_sauce_options(self):
options.tags = tags
options.time_zone = 'San Francisco'
options.tunnel_identifier = 'tunnelname'
options.tunnel_owner = 'tunnelowner'
options.video_upload_on_pass = False

assert options.build == 'Sample Build Name'
Expand All @@ -291,6 +296,7 @@ def test_sauce_options(self):
assert options.tags == tags
assert options.time_zone == 'San Francisco'
assert options.tunnel_identifier == 'tunnelname'
assert options.tunnel_owner == 'tunnelowner'
assert options.video_upload_on_pass is False

def test_setting_browser_name(self):
Expand Down Expand Up @@ -369,6 +375,7 @@ def test_capabilities_for_sauce(self):
options.tags = tags
options.time_zone = 'San Francisco'
options.tunnel_identifier = 'tunnelname'
options.tunnel_owner = 'tunnelowner'
options.video_upload_on_pass = False

expected_capabilities = {'browserName': 'MicrosoftEdge',
Expand All @@ -393,6 +400,7 @@ def test_capabilities_for_sauce(self):
'tags': ['foo', 'bar'],
'timeZone': 'San Francisco',
'tunnelIdentifier': 'tunnelname',
'tunnelOwner': 'tunnelowner',
'videoUploadOnPass': False,
'username': os.getenv('SAUCE_USERNAME'),
'accessKey': os.getenv('SAUCE_ACCESS_KEY')}}
Expand Down
9 changes: 9 additions & 0 deletions python/tests/unit/test_firefox.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def test_accepts_sauce_values_with_dict(self):
'tags': ['foo', 'bar'],
'timeZone': 'Foo',
'tunnelIdentifier': 'foobar',
'tunnelOwner': 'baz',
'videoUploadOnPass': False}

sauce = SauceOptions.firefox(**options)
Expand Down Expand Up @@ -114,6 +115,7 @@ def test_accepts_sauce_values_with_dict(self):
assert sauce.tags == ['foo', 'bar']
assert sauce.time_zone == 'Foo'
assert sauce.tunnel_identifier == 'foobar'
assert sauce.tunnel_owner == 'baz'
assert sauce.video_upload_on_pass is False

def test_accepts_sauce_values_as_params(self):
Expand Down Expand Up @@ -142,6 +144,7 @@ def test_accepts_sauce_values_as_params(self):
tags=['foo', 'bar'],
timeZone='Foo',
tunnelIdentifier='foobar',
tunnelOwner='baz',
videoUploadOnPass=False)

assert sauce.build == 'bar'
Expand All @@ -167,6 +170,7 @@ def test_accepts_sauce_values_as_params(self):
assert sauce.tags == ['foo', 'bar']
assert sauce.time_zone == 'Foo'
assert sauce.tunnel_identifier == 'foobar'
assert sauce.tunnel_owner == 'baz'
assert sauce.video_upload_on_pass is False

def test_accepts_selenium_browser_options_instance(self):
Expand Down Expand Up @@ -278,6 +282,7 @@ def test_sauce_options(self):
options.tags = tags
options.time_zone = 'San Francisco'
options.tunnel_identifier = 'tunnelname'
options.tunnel_owner = 'tunnelowner'
options.video_upload_on_pass = False

assert options.build == 'Sample Build Name'
Expand All @@ -299,6 +304,7 @@ def test_sauce_options(self):
assert options.tags == tags
assert options.time_zone == 'San Francisco'
assert options.tunnel_identifier == 'tunnelname'
assert options.tunnel_owner == 'tunnelowner'
assert options.video_upload_on_pass is False

def test_setting_browser_name(self):
Expand Down Expand Up @@ -369,6 +375,7 @@ def test_setting_capabilities(self):
assert options.tags == tags
assert options.time_zone == 'San Francisco'
assert options.tunnel_identifier == 'tunnelname'
assert options.tunnel_owner == 'tunnelowner'
assert options.video_upload_on_pass is False


Expand Down Expand Up @@ -436,6 +443,7 @@ def test_capabilities_for_sauce(self):
options.tags = tags
options.time_zone = 'San Francisco'
options.tunnel_identifier = 'tunnelname'
options.tunnel_owner = 'tunnelowner'
options.video_upload_on_pass = False

expected_capabilities = {'browserName': 'firefox',
Expand All @@ -461,6 +469,7 @@ def test_capabilities_for_sauce(self):
'tags': ['foo', 'bar'],
'timeZone': 'San Francisco',
'tunnelIdentifier': 'tunnelname',
'tunnelOwner': 'tunnelowner',
'videoUploadOnPass': False,
'username': os.getenv('SAUCE_USERNAME'),
'accessKey': os.getenv('SAUCE_ACCESS_KEY')}}
Expand Down
8 changes: 8 additions & 0 deletions python/tests/unit/test_ie.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def test_accepts_sauce_values_with_dict(self):
'tags': ['foo', 'bar'],
'timeZone': 'Foo',
'tunnelIdentifier': 'foobar',
'tunnelOwner': 'baz',
'videoUploadOnPass': False}

sauce = SauceOptions.ie(**options)
Expand Down Expand Up @@ -113,6 +114,7 @@ def test_accepts_sauce_values_with_dict(self):
assert sauce.tags == ['foo', 'bar']
assert sauce.time_zone == 'Foo'
assert sauce.tunnel_identifier == 'foobar'
assert sauce.tunnel_owner == 'baz'
assert sauce.video_upload_on_pass is False

def test_accepts_sauce_values_as_params(self):
Expand Down Expand Up @@ -142,6 +144,7 @@ def test_accepts_sauce_values_as_params(self):
tags=['foo', 'bar'],
timeZone='Foo',
tunnelIdentifier='foobar',
tunnelOwner='baz',
videoUploadOnPass=False)

assert sauce.avoid_proxy is True
Expand All @@ -168,6 +171,7 @@ def test_accepts_sauce_values_as_params(self):
assert sauce.tags == ['foo', 'bar']
assert sauce.time_zone == 'Foo'
assert sauce.tunnel_identifier == 'foobar'
assert sauce.tunnel_owner == 'baz'
assert sauce.video_upload_on_pass is False

def test_accepts_selenium_browser_options_instance(self):
Expand Down Expand Up @@ -279,6 +283,7 @@ def test_sauce_options(self):
options.tags = tags
options.time_zone = 'San Francisco'
options.tunnel_identifier = 'tunnelname'
options.tunnel_owner = 'tunnelowner'
options.video_upload_on_pass = False

assert options.build == 'Sample Build Name'
Expand All @@ -300,6 +305,7 @@ def test_sauce_options(self):
assert options.tags == tags
assert options.time_zone == 'San Francisco'
assert options.tunnel_identifier == 'tunnelname'
assert options.tunnel_owner == 'tunnelowner'
assert options.video_upload_on_pass is False

def test_setting_browser_name(self):
Expand Down Expand Up @@ -379,6 +385,7 @@ def test_capabilities_for_sauce(self):
options.tags = tags
options.time_zone = 'San Francisco'
options.tunnel_identifier = 'tunnelname'
options.tunnel_owner = 'tunnelowner'
options.video_upload_on_pass = False

expected_capabilities = {'browserName': 'internet explorer',
Expand All @@ -404,6 +411,7 @@ def test_capabilities_for_sauce(self):
'tags': ['foo', 'bar'],
'timeZone': 'San Francisco',
'tunnelIdentifier': 'tunnelname',
'tunnelOwner': 'tunnelowner',
'videoUploadOnPass': False,
'username': os.getenv('SAUCE_USERNAME'),
'accessKey': os.getenv('SAUCE_ACCESS_KEY')}}
Expand Down
8 changes: 8 additions & 0 deletions python/tests/unit/test_old_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def test_accepts_sauce_values_with_dict(self):
'tags': ['foo', 'bar'],
'timeZone': 'Foo',
'tunnelIdentifier': 'foobar',
'tunnelOwner': 'baz',
'videoUploadOnPass': False}

sauce = SauceOptions(**options)
Expand Down Expand Up @@ -129,6 +130,7 @@ def test_accepts_sauce_values_with_dict(self):
assert sauce.tags == ['foo', 'bar']
assert sauce.time_zone == 'Foo'
assert sauce.tunnel_identifier == 'foobar'
assert sauce.tunnel_owner == 'baz'
assert sauce.video_upload_on_pass is False

def test_accepts_sauce_values_as_params(self):
Expand Down Expand Up @@ -161,6 +163,7 @@ def test_accepts_sauce_values_as_params(self):
tags=['foo', 'bar'],
timeZone='Foo',
tunnelIdentifier='foobar',
tunnelOwner='baz',
videoUploadOnPass=False)

assert sauce.avoid_proxy is True
Expand Down Expand Up @@ -190,6 +193,7 @@ def test_accepts_sauce_values_as_params(self):
assert sauce.tags == ['foo', 'bar']
assert sauce.time_zone == 'Foo'
assert sauce.tunnel_identifier == 'foobar'
assert sauce.tunnel_owner == 'baz'
assert sauce.video_upload_on_pass is False

def test_accepts_selenium_browser_options_instance(self):
Expand Down Expand Up @@ -308,6 +312,7 @@ def test_sauce_options(self):
options.tags = tags
options.time_zone = 'San Francisco'
options.tunnel_identifier = 'tunnelname'
options.tunnel_owner = 'tunnelowner'
options.video_upload_on_pass = False

assert options.avoid_proxy is True
Expand Down Expand Up @@ -387,6 +392,7 @@ def test_setting_capabilities(self):
assert options.tags == tags
assert options.time_zone == 'San Francisco'
assert options.tunnel_identifier == 'tunnelname'
assert options.tunnel_owner == 'tunnelowner'
assert options.video_upload_on_pass is False


Expand Down Expand Up @@ -459,6 +465,7 @@ def test_capabilities_for_sauce(self):
options.tags = tags
options.time_zone = 'San Francisco'
options.tunnel_identifier = 'tunnelname'
options.tunnel_owner = 'tunnelowner'
options.video_upload_on_pass = False

expected_capabilities = {'browserName': 'chrome',
Expand Down Expand Up @@ -488,6 +495,7 @@ def test_capabilities_for_sauce(self):
'tags': ['foo', 'bar'],
'timeZone': 'San Francisco',
'tunnelIdentifier': 'tunnelname',
'tunnelOwner': 'tunnelowner',
'videoUploadOnPass': False,
'username': os.getenv('SAUCE_USERNAME'),
'accessKey': os.getenv('SAUCE_ACCESS_KEY')}}
Expand Down
Loading