Skip to content

Commit

Permalink
Fix test_galaxy_mapping to respect constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Sep 20, 2024
1 parent 334c251 commit 0c43588
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/unit/data/test_galaxy_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
get_object_session,
)
from galaxy.model.security import GalaxyRBACAgent
from galaxy.model.unittest_utils.utils import random_email
from galaxy.objectstore import QuotaSourceMap
from galaxy.util.unittest import TestCase

Expand Down Expand Up @@ -78,7 +79,7 @@ def expunge(cls):
class TestMappings(BaseModelTestCase):

def test_dataset_instance_order(self) -> None:
u = model.User(email="[email protected]", password="password")
u = model.User(email=random_email(), password="password")
h1 = model.History(name="History 1", user=u)
elements = []
list_pair = model.DatasetCollection(collection_type="list:paired")
Expand Down Expand Up @@ -213,7 +214,7 @@ def test_nested_collection_attributes(self):
assert c4.dataset_elements == [dce1, dce2]

def test_history_audit(self):
u = model.User(email="[email protected]", password="password")
u = model.User(email=random_email(), password="password")
h1 = model.History(name="HistoryAuditHistory", user=u)
h2 = model.History(name="HistoryAuditHistory", user=u)

Expand Down Expand Up @@ -272,7 +273,7 @@ def test_flush_refreshes(self):
# states and flushing in SQL Alchemy is very subtle and it is good to have a executable
# reference for how it behaves in the context of Galaxy objects.
model = self.model
user = model.User(email="[email protected]", password="password")
user = model.User(email=random_email(), password="password")
galaxy_session = model.GalaxySession()
galaxy_session_other = model.GalaxySession()
galaxy_session.user = user
Expand Down Expand Up @@ -345,7 +346,7 @@ def test_flush_refreshes(self):
assert "id" not in inspect(galaxy_model_object_new).unloaded

def test_workflows(self):
user = model.User(email="[email protected]", password="password")
user = model.User(email=random_email(), password="password")

child_workflow = _workflow_from_steps(user, [])
self.persist(child_workflow)
Expand Down

0 comments on commit 0c43588

Please sign in to comment.