mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
add case [in]sensitivity tests + add OfficialProvider model
`ci` in this context means "Case Insensitive". `cs` in this context means "Case Sensitive". New models created: - OfficialProvider This was required to write a test for checking that OfficialProviders behaves as we expect, which was the starter for the original aurblup bug. New tests created: - test_official_provider Modified tests: - test_package_base: add ci test - test_package: add ci test - test_session: add cs test - test_ssh_pub_key: add cs test Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
e865a6347f
commit
1874e821f5
6 changed files with 167 additions and 0 deletions
|
@ -33,6 +33,15 @@ def test_session():
|
|||
assert session.UsersID == user.ID
|
||||
|
||||
|
||||
def test_session_cs():
|
||||
""" Test case sensitivity of the database table. """
|
||||
session_cs = create(Session, UsersID=user.ID,
|
||||
SessionID="TESTSESSION",
|
||||
LastUpdateTS=datetime.utcnow().timestamp())
|
||||
assert session_cs.SessionID == "TESTSESSION"
|
||||
assert session.SessionID == "testSession"
|
||||
|
||||
|
||||
def test_session_user_association():
|
||||
# Make sure that the Session user attribute is correct.
|
||||
assert session.User == user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue