From 6d72e62f15e43def91a7c494b7f303a08fb270da Mon Sep 17 00:00:00 2001 From: Allen Short Date: Tue, 26 Mar 2019 18:29:10 -0500 Subject: [PATCH] more stable test_interactive_new --- redash/cli/data_sources.py | 2 +- tests/test_cli.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/redash/cli/data_sources.py b/redash/cli/data_sources.py index 76e54a88c7..f30ba40bb4 100644 --- a/redash/cli/data_sources.py +++ b/redash/cli/data_sources.py @@ -110,7 +110,7 @@ def new(name=None, type=None, options=None, organization='default'): options_obj = {} - for k, prop in schema['properties'].iteritems(): + for k, prop in sorted(schema['properties'].iteritems()): required = k in schema.get('required', []) default_value = "<>" if required: diff --git a/tests/test_cli.py b/tests/test_cli.py index b6447f6a78..789e3b8712 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -16,7 +16,7 @@ def test_interactive_new(self): result = runner.invoke( manager, ['ds', 'new'], - input="test\n%s\n\n\n\n\nexample.com\n\n\n\ntestdb\n" % (pg_i,)) + input="test\n%s\ntestdb\n" % (pg_i,)) self.assertFalse(result.exception) self.assertEqual(result.exit_code, 0) self.assertEqual(DataSource.query.count(), 1)