Created
December 24, 2017 08:41
-
-
Save exhuma/0728d2feb38aff0e4bd00ebd94440ca5 to your computer and use it in GitHub Desktop.
Using dedent to keep multi-line-strings on same indent-level as the rest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class TestFrontendHelpers(TestCase): | |
| SQLALCHEMY_DATABASE_URI = 'postgresql://exhuma@/powonline_testing' | |
| SQLALCHEMY_TRACK_MODIFICATIONS = False | |
| TESTING = True | |
| def __create_app(self): | |
| config = ConfigParser() | |
| config.read_string(dedent( | |
| '''\ | |
| [db] | |
| dsn = %s | |
| [security] | |
| jwt_secret = %s | |
| ''' % ( | |
| TestFrontendHelpers.SQLALCHEMY_DATABASE_URI, | |
| 'testing' | |
| ))) | |
| return make_app(config) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| The same without dedent | |
| """ | |
| class TestFrontendHelpers(TestCase): | |
| SQLALCHEMY_DATABASE_URI = 'postgresql://exhuma@/powonline_testing' | |
| SQLALCHEMY_TRACK_MODIFICATIONS = False | |
| TESTING = True | |
| def __create_app(self): | |
| config = ConfigParser() | |
| config.read_string( | |
| ''' | |
| [db] | |
| dsn = %s | |
| [security] | |
| jwt_secret = %s | |
| ''' % ( | |
| TestFrontendHelpers.SQLALCHEMY_DATABASE_URI, | |
| 'testing' | |
| )) | |
| return make_app(config) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment