-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into enhancement-oep-django-5-migration
- Loading branch information
Showing
68 changed files
with
653 additions
and
207 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Ignore all HTML files, because they contain | ||
# django markup that will not be broken by prettier | ||
**/*.html | ||
|
||
docs/* |
This file contains 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
43 changes: 43 additions & 0 deletions
43
api/tests/test_regression/test_issue_1885_table_creation_fail_behavior.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from api import actions | ||
from api.actions import has_table | ||
from api.tests import APITestCase | ||
|
||
|
||
class TestTableNameUnique(APITestCase): | ||
schema_sandbox = "sandbox" | ||
|
||
@classmethod | ||
def setUpClass(cls): | ||
super().setUpClass() | ||
actions.perform_sql(f"DROP SCHEMA IF EXISTS {cls.schema_sandbox} CASCADE") | ||
actions.perform_sql(f"CREATE SCHEMA {cls.schema_sandbox}") | ||
actions.perform_sql(f"DROP SCHEMA IF EXISTS _{cls.schema_sandbox} CASCADE") | ||
actions.perform_sql(f"CREATE SCHEMA _{cls.schema_sandbox}") | ||
|
||
def test_tables_should_not_exists_on_error(self): | ||
test_duplicate_column_table_name = "table_column_duplicate" | ||
# create table with duplicated column names will should an error | ||
duplicate_field_error_data_struct = { | ||
"columns": [ | ||
{"name": "id", "data_type": "bigint"}, | ||
{"name": "id", "data_type": "bigint"}, | ||
] | ||
} | ||
# create table in default (test) schema (django_db) | ||
self.assertRaises( | ||
AssertionError, | ||
self.create_table, | ||
table=test_duplicate_column_table_name, | ||
structure=duplicate_field_error_data_struct, | ||
schema=self.schema_sandbox, | ||
) | ||
|
||
# also check: table should not have been created in oedb | ||
self.assertFalse( | ||
has_table( | ||
{ | ||
"table": test_duplicate_column_table_name, | ||
"schema": self.schema_sandbox, | ||
} | ||
) | ||
) |
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
Oops, something went wrong.