Skip to content

Commit 7a21ebe

Browse files
committed
add simple tests
1 parent 365687d commit 7a21ebe

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

‎tests/test_fetch_token.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import unittest
2+
from bloom.bloom import fetch_auth_token
3+
4+
5+
class TestFetchAuthToken(unittest.TestCase):
6+
7+
def test_empty_env(self):
8+
self.assertIsNone(fetch_auth_token(audience="", client_id="", client_secret="", grant_type=""))

‎tests/test_tokenizer.py‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import unittest
2+
import json
3+
from bloom.bloom import tokenize_json
4+
5+
6+
class TestFetchAuthToken(unittest.TestCase):
7+
8+
def test_empty_env(self):
9+
"""make sure the more complex replacements take place."""
10+
11+
consumer_info = {
12+
"ssn": "123456789",
13+
"city": "Scranton",
14+
"line1": "1725 Slough Avenue",
15+
"state_code": "PA",
16+
"zipcode": "18503",
17+
"date_of_birth": "1964-03-15",
18+
"first_name": "Michael",
19+
"last_name": "Scott",
20+
"address_primary": True
21+
}
22+
23+
new = tokenize_json('consumer.json', consumer_info)
24+
25+
data = json.loads(new)
26+
27+
self.assertTrue(data['data']['attributes']['addresses'][0]['primary'])

0 commit comments

Comments
 (0)