Skip to content

Commit ccca1da

Browse files
committed
Add a fake test to enable populating db with ORM tests from gel-python
You can do something like: edb inittestdb -k test_orm --update --tests-dir misc/fake-tests/
1 parent b5ab800 commit ccca1da

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

misc/fake-tests/test_orm.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#
2+
# This source file is part of the EdgeDB open source project.
3+
#
4+
# Copyright 2012-present MagicStack Inc. and the EdgeDB authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
'''
20+
You can use this to set up the gel-python orm database:
21+
22+
edb inittestdb -k test_orm --update --tests-dir misc/fake-tests/
23+
'''
24+
25+
import os.path
26+
import pathlib
27+
28+
from edb.testbase import server as tb
29+
30+
31+
TEST_DIR = (
32+
pathlib.Path(__file__).parent.parent.parent.parent
33+
/ 'gel-python'
34+
/ 'tests'
35+
/ 'dbsetup'
36+
)
37+
38+
39+
class TestORM(tb.QueryTestCase):
40+
FULL_SCHEMA = TEST_DIR / 'orm.gel'
41+
SETUP = TEST_DIR / 'orm.edgeql'
42+
43+
async def test_orm_dummy(self):
44+
pass

0 commit comments

Comments
 (0)