Skip to content

Commit

Permalink
Why doesn't the update bug appear at the model level?
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Mar 18, 2024
1 parent d914eb6 commit e67bff7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions test/unit/data/test_model_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,18 @@ def test_history_dataset_copy(num_datasets=NUM_DATASETS, include_metadata_file=I
session.commit()

history_copy_timer = ExecutionTimer()
new_history = old_history.copy(target_user=old_history.user)
original_update_time = old_history.update_time
assert original_update_time
new_history = old_history.copy(name="new name", target_user=old_history.user, all_datasets=True)
session.add(new_history)
session.add(old_history)
with transaction(session):
session.commit()
session.refresh(old_history)
new_update_time = session.get(model.History, old_history.id).update_time
assert original_update_time == new_update_time
print("history copied %s" % history_copy_timer)
assert new_history.name == "HistoryCopyHistory1"
assert new_history.name == "new name"
assert new_history.user == old_history.user
for hda in new_history.active_datasets:
assert hda.get_size() == 3
Expand Down

0 comments on commit e67bff7

Please sign in to comment.