-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from deltachat/mailcow-tags
Add token name as tag in mailcow
- Loading branch information
Showing
4 changed files
with
14 additions
and
6 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 |
---|---|---|
|
@@ -94,7 +94,7 @@ def test_adduser_mailcow_exists(conn, mailcow): | |
token_info = conn.add_token("burner1", expiry="1w", token="1w_7wDioPeeXyZx96v3", prefix="tmp.") | ||
addr = "pytest.%[email protected]" % (randint(0, 999),) | ||
|
||
mailcow.add_user_mailcow(addr, "asdf1234") | ||
mailcow.add_user_mailcow(addr, "asdf1234", token_info.name) | ||
with pytest.raises(MailcowError): | ||
conn.add_email_account(token_info, addr=addr) | ||
for user in conn.get_user_list(): | ||
|
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 |
---|---|---|
|
@@ -10,10 +10,11 @@ def test_get_users(self, mailcow): | |
|
||
def test_add_del_user(self, mailcow): | ||
addr = "pytest.%[email protected]" % (randint(0, 999),) | ||
mailcow.add_user_mailcow(addr, "asdf1234") | ||
mailcow.add_user_mailcow(addr, "asdf1234", "pytest") | ||
|
||
user = mailcow.get_user(addr) | ||
assert user.addr == addr | ||
assert "pytest" == user.token | ||
|
||
mailcow.del_user_mailcow(addr) | ||
assert mailcow.get_user(addr) is None | ||
|
@@ -24,7 +25,7 @@ def test_wrong_token(self, mailcow): | |
with pytest.raises(MailcowError): | ||
mailcow.get_user_list() | ||
with pytest.raises(MailcowError): | ||
mailcow.add_user_mailcow(addr, "asdf1234") | ||
mailcow.add_user_mailcow(addr, "asdf1234", "pytest") | ||
with pytest.raises(MailcowError): | ||
mailcow.get_user(addr) | ||
with pytest.raises(MailcowError): | ||
|