Skip to content

Commit b4a6bf8

Browse files
committed
fixed broken mock in test
1 parent 8ece403 commit b4a6bf8

File tree

7 files changed

+6
-6
lines changed

7 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# *dbml_sqlite*
55

6-
**v0.2.4**
6+
**v0.2.5**
77

88
This is a simple package built on top of [the PyDBML package by Vanderhoof](https://github.com/Vanderhoof/PyDBML). It allows you, within certain constraints, to generate valid SQLite from `.dbml` files for your Python programs.
99

dbml_sqlite/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from .core import *
22
from .terminal import cli
33

4-
__version__ = '0.2.4'
4+
__version__ = '0.2.5'
55

dbml_sqlite/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def processIndex(table, index, idxNameFunc=uuid.uuid4, indexExists=True, join=Tr
108108
if index.name != "" and index.name != None:
109109
parts.append(index.name)
110110
else:
111-
parts.append(''.join(str(idxNameFunc()).split('-')))
111+
parts.append('_' + ''.join(str(idxNameFunc()).split('-')))
112112
parts.append(f' ON {table.name} (')
113113
for i, col in enumerate(index.subjects):
114114
parts.append(col.name)
7.43 KB
Binary file not shown.

dist/DBML_SQLite-0.2.5.tar.gz

5.88 KB
Binary file not shown.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "DBML_SQLite"
3-
version = "0.2.4"
3+
version = "0.2.5"
44
description = "A package that provides a CLI tool and a functional API for converting dbml files to SQLite DDL."
55
authors = ["Dave VanderWeele <[email protected]>"]
66
repository = 'https://github.com/dvanderweele/DBML_SQLite'

tests/test_dbml_sqlite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def SQLogger(inp):
4747
s.write(inp)
4848

4949
def test_version():
50-
assert __version__ == '0.2.4'
50+
assert __version__ == '0.2.5'
5151

5252
def test_toSQLite():
5353
assert isinstance(toSQLite(), str)
@@ -132,7 +132,7 @@ def test_process_enum():
132132
def test_process_file():
133133
p = Path('./tests/abc.dbml')
134134
o = processFile(p, 'full', True, True, MockNameFunc)
135-
assert o == 'CREATE TABLE IF NOT EXISTS mytab (\n name TEXT,\n phone INTEGER\n);\nCREATE INDEX IF NOT EXISTS mockname ON mytab (name, phone);\n'
135+
assert o == 'CREATE TABLE IF NOT EXISTS mytab (\n name TEXT,\n phone INTEGER\n);\nCREATE INDEX IF NOT EXISTS _mockname ON mytab (name, phone);\n'
136136

137137
def test_process_index():
138138
mytab = MockTable('mytab', [], [])

0 commit comments

Comments
 (0)