Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

class BatchMgmtScenarioTests(ScenarioTest):

def __init__(self, method_name):
super().__init__(method_name, recording_processors=[
def __init__(self, method_name, *arg, **kwargs):
super().__init__(method_name, *arg, random_config_dir=True, **kwargs, recording_processors=[
BatchAccountKeyReplacer(),
StorageSASReplacer()
])
Expand Down Expand Up @@ -343,6 +343,10 @@ def test_batch_application_cmd(self, resource_group, storage_account):


class BatchMgmtByosScenarioTests(ScenarioTest):

def __init__(self, method_name, *arg, **kwargs):
super().__init__(method_name, *arg, random_config_dir=True, **kwargs)
Comment on lines +347 to +348
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to explicitly specify method_name. It is part of *arg.

Suggested change
def __init__(self, method_name, *arg, **kwargs):
super().__init__(method_name, *arg, random_config_dir=True, **kwargs)
def __init__(self, *arg, **kwargs):
super().__init__(*arg, random_config_dir=True, **kwargs)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, as this pattern is frequently used elsewhere:

def __init__(self, method_name):
super(WebAppConnectionScenarioTest, self).__init__(
method_name,
recording_processors=[CredentialReplacer(), ConfigCredentialReplacer()]
)

You can keep it for now.


@ResourceGroupPreparer(location='eastus')
def test_batch_byos_account_cmd(self):
account_name = self.create_random_name(prefix='clibatchtestacct', length=24)
Expand Down