-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added truncation to the formatted message sent to Discord when syncin…
…g. Added a test case to confirm.
- Loading branch information
Paul Philion
committed
Feb 28, 2024
1 parent
6e03d4e
commit 2566a86
Showing
3 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
"""Utilities to help testing""" | ||
|
||
import time | ||
import string | ||
import random | ||
import logging | ||
import unittest | ||
from unittest import mock | ||
|
@@ -37,6 +39,11 @@ def tagstr() -> str: | |
"""convert the current timestamp in seconds to a base36 str""" | ||
return dumps(int(time.time())) | ||
|
||
|
||
def randstr(length:int=12) -> str: | ||
return ''.join(random.choices(string.ascii_uppercase + string.digits, k=length)) | ||
|
||
|
||
def create_test_user(redmine:Client, tag:str): | ||
# create new test user name: [email protected], login test-12345 | ||
first = "test-" + tag | ||
|