Skip to content

Commit

Permalink
Test local table creation with CURRENT_TIMESTAMP
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph-blessing committed Oct 5, 2023
1 parent 4ee3184 commit 9255c40
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/functional/test_creation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import datajoint as dj
import pytest

from link import link

Expand Down Expand Up @@ -28,3 +29,23 @@ def test_local_table_creation_from_source_table_that_has_parent_raises_no_error(
"Outbound",
schema_names["local"],
)(type(source_table_name, (dj.Manual,), {}))


@pytest.mark.xfail()
def test_local_table_creation_from_source_table_that_uses_current_timestamp_default_raises_no_error(
prepare_link, create_table, prepare_table, databases, configured_environment, connection_config
):
schema_names, user_specs = prepare_link()
source_table_name = "Foo"
source_table = create_table(source_table_name, dj.Manual, "foo = CURRENT_TIMESTAMP : timestamp")
prepare_table(databases["source"], user_specs["source"], schema_names["source"], source_table)
with connection_config(databases["local"], user_specs["local"]), configured_environment(
user_specs["link"], schema_names["outbound"]
):
link(
databases["source"].container.name,
schema_names["source"],
schema_names["outbound"],
"Outbound",
schema_names["local"],
)(type(source_table_name, (dj.Manual,), {}))

0 comments on commit 9255c40

Please sign in to comment.