From 1ba476e34dbd31522c39074877fff1101ad84ca7 Mon Sep 17 00:00:00 2001 From: John Davis Date: Tue, 11 Jun 2024 23:07:02 -0400 Subject: [PATCH] Drop new unit tests until 24.2 --- test/unit/data/model/db/test_user.py | 34 ---------------------------- 1 file changed, 34 deletions(-) delete mode 100644 test/unit/data/model/db/test_user.py diff --git a/test/unit/data/model/db/test_user.py b/test/unit/data/model/db/test_user.py deleted file mode 100644 index 308ce6c9aa45..000000000000 --- a/test/unit/data/model/db/test_user.py +++ /dev/null @@ -1,34 +0,0 @@ -from galaxy.managers.users import ( - filter_out_invalid_username_characters, - username_exists, - username_from_email, -) -from galaxy.model import User - - -def test_username_from_email(session, make_user): - make_user(username="foo") - next_username = username_from_email(session, "foo@.foo.com", User) - assert next_username == "foo-1" # because foo exists - - make_user(username="foo-1") - next_username = username_from_email(session, "foo@.foo.com", User) - assert next_username == "foo-2" # because foo and foo-1 exist - - make_user(username="foo-2") - next_username = username_from_email(session, "foo@.foo.com", User) - assert next_username == "foo-3" # because foo and foo-1 and foo-2 exist - - next_username = username_from_email(session, "bar@.foo.com", User) - assert next_username == "bar" # no change - - -def test_filter_out_invalid_username_characters(): - username = "abcDCE123$%^-." - assert filter_out_invalid_username_characters(username) == "abc---123----." - - -def test_username_exists(session, make_user): - make_user(username="foo", email="foo@foo.com") - assert username_exists(session, "foo") - assert not username_exists(session, "bar")