Skip to content

Commit

Permalink
Fix init command Windows integration tests (#4107)
Browse files Browse the repository at this point in the history
* empty

* Trigger tests

* Use os.path.join for filepaths in test cases
  • Loading branch information
NiallRees authored Oct 21, 2021
1 parent 3ae9475 commit 34c23fe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/integration/040_init_test/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ def tearDown(self):
super().tearDown()

def get_project_name(self):
return "my_project_{}".format(self.unique_schema())
return 'my_project_{}'.format(self.unique_schema())

@property
def schema(self):
return "init_040"
return 'init_040'

@property
def models(self):
return "models"
return 'models'

@use_profile('postgres')
@mock.patch('click.confirm')
Expand All @@ -51,7 +51,7 @@ def test_postgres_init_task_in_project_with_existing_profiles_yml(self, mock_pro
self.run_dbt(['init'])

manager.assert_has_calls([
call.confirm(f'The profile test already exists in {self.test_root_dir}/profiles.yml. Continue and overwrite it?'),
call.confirm(f"The profile test already exists in {os.path.join(self.test_root_dir, 'profiles.yml')}. Continue and overwrite it?"),
call.prompt("Which database would you like to use?\n[1] postgres\n\n(Don't see the one you want? https://docs.getdbt.com/docs/available-adapters)\n\nEnter a number", type=click.INT),
call.prompt('threads (1 or more)', default=1, hide_input=False, type=click.INT),
call.prompt('host (hostname for the instance)', default=None, hide_input=False, type=None),
Expand Down Expand Up @@ -272,7 +272,7 @@ def test_postgres_init_task_in_project_with_invalid_profile_template(self, mock_
self.run_dbt(['init'])

manager.assert_has_calls([
call.confirm(f'The profile test already exists in {self.test_root_dir}/profiles.yml. Continue and overwrite it?'),
call.confirm(f"The profile test already exists in {os.path.join(self.test_root_dir, 'profiles.yml')}. Continue and overwrite it?"),
call.prompt("Which database would you like to use?\n[1] postgres\n\n(Don't see the one you want? https://docs.getdbt.com/docs/available-adapters)\n\nEnter a number", type=click.INT),
call.prompt('threads (1 or more)', default=1, hide_input=False, type=click.INT),
call.prompt('host (hostname for the instance)', default=None, hide_input=False, type=None),
Expand Down

0 comments on commit 34c23fe

Please sign in to comment.