diff options
author | astroshot <astroshot@outlook.com> | 2023-06-23 13:05:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-23 07:05:58 +0200 |
commit | 69dcceb5f6d3ecbcc9e7a0a48c9bdabeed470dcd (patch) | |
tree | bcec4d19e6de6997f023f087504466a3da0380e4 /tests | |
parent | 6b868bbfe831678d10c7535eb2e7356fcfb42068 (diff) |
Fix sql-insert format emits NULL as 'None' (#1409)
* Sub: Fix issue #1408
Body:
1. Fix issue #1408 sql-insert format emits NULL as 'None';
2. Fix DUAL displays as ""DUAL"";
==== End ====
* Sub: Update changelog.rst
Body:
==== End ====
* Sub: Optimize if logic
Body:
==== End ====
Diffstat (limited to 'tests')
-rw-r--r-- | tests/formatter/test_sqlformatter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/formatter/test_sqlformatter.py b/tests/formatter/test_sqlformatter.py index b8cd9c2b..016ed956 100644 --- a/tests/formatter/test_sqlformatter.py +++ b/tests/formatter/test_sqlformatter.py @@ -34,7 +34,7 @@ def test_output_sql_insert(): "Jackson", "jackson_test@gmail.com", "132454789", - "", + None, "2022-09-09 19:44:32.712343+08", "2022-09-09 19:44:32.712343+08", ] @@ -58,7 +58,7 @@ def test_output_sql_insert(): output_list = [l for l in output] expected = [ 'INSERT INTO "user" ("id", "name", "email", "phone", "description", "created_at", "updated_at") VALUES', - " ('1', 'Jackson', 'jackson_test@gmail.com', '132454789', '', " + " ('1', 'Jackson', 'jackson_test@gmail.com', '132454789', NULL, " + "'2022-09-09 19:44:32.712343+08', '2022-09-09 19:44:32.712343+08')", ";", ] |