Skip to content

Commit f52b8a7

Browse files
Merge branch 'duplicate-secondary-attr-test' into duplicate-secondary-attr
2 parents 26f6265 + a172a1d commit f52b8a7

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

LNX-docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ services:
3232
interval: 1s
3333
fakeservices.datajoint.io:
3434
<<: *net
35-
image: raphaelguzman/nginx:v0.0.13
35+
image: datajoint/nginx:v0.0.15
3636
environment:
3737
- ADD_db_TYPE=DATABASE
3838
- ADD_db_ENDPOINT=db:3306

datajoint/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = "0.13.dev5"
1+
__version__ = "0.13.dev6"
22

33
assert len(__version__) <= 10 # The log table limits version to the 10 characters

local-docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ services:
3434
interval: 1s
3535
fakeservices.datajoint.io:
3636
<<: *net
37-
image: raphaelguzman/nginx:v0.0.13
37+
image: datajoint/nginx:v0.0.15
3838
environment:
3939
- ADD_db_TYPE=DATABASE
4040
- ADD_db_ENDPOINT=db:3306

tests/schema.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,19 +348,21 @@ class ThingC(dj.Manual):
348348

349349

350350
@schema
351-
class Parent(dj.Manual):
351+
class Parent(dj.Lookup):
352352
definition = """
353353
parent_id: int
354354
---
355355
name: varchar(30)
356356
"""
357+
contents = [(1, 'Joe')]
357358

358359

359360
@schema
360-
class Child(dj.Manual):
361+
class Child(dj.Lookup):
361362
definition = """
362363
-> Parent
363364
child_id: int
364365
---
365366
name: varchar(30)
366367
"""
368+
contents = [(1, 12, 'Dan')]

tests/test_fetch.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,6 @@ def test_key_fetch1(self):
251251
assert_equal(k1, k2)
252252

253253
def test_same_secondary_attribute(self):
254-
print(schema.Child * schema.Parent().proj())
254+
children = (schema.Child * schema.Parent().proj()).fetch()['name']
255+
assert len(children) == 1
256+
assert children[0] == (1, 12, 'Dan')

0 commit comments

Comments
 (0)