-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent non-lowercase client names (#128)
We're using Azure storage blob containers under the hood to map clients to their state. Containers are created as lower-case so the client names should also be lower-case.
- Loading branch information
Showing
4 changed files
with
23 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def is_lowercase(string: str) -> bool: | ||
return string.lower() == string |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from unittest import TestCase | ||
|
||
from opwen_email_server.utils.string import is_lowercase | ||
|
||
|
||
class IsLowercaseTests(TestCase): | ||
def test_lowercase(self): | ||
self.assertTrue(is_lowercase('foo')) | ||
|
||
def test_uppercase(self): | ||
self.assertFalse(is_lowercase('FoO')) |