Skip to content

Commit

Permalink
Merge branch 'master' of github.com:btimby/py-radius into unknown-att…
Browse files Browse the repository at this point in the history
…ributes
  • Loading branch information
btimby committed May 7, 2018
2 parents d5632df + 4e663b7 commit a1a4b78
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def test_set_get_item(self):
self.assertEqual([b'foobar'], a[radius.ATTR_USER_NAME])
self.assertEqual([b'foobar'], a['user-name'])
self.assertEqual([b'foobar'], a['user-Name'])
self.assertEqual([('User-Name', ['foobar'])], list(a.nameditems()))

def test_init_update(self):
"""Test __init__ and update."""
Expand All @@ -81,6 +82,9 @@ def test_init_update(self):
a.update({'User-Password': b'raboof'})
self.assertEqual([b'foobar'], a['User-Name'])
self.assertEqual([b'raboof'], a['User-Password'])
self.assertEqual(
[('User-Name', ['foobar']), ('User-Password', ['raboof'])],
list(a.nameditems()))

def test_un_pack(self):
"""Test packing and unpacking attributes."""
Expand All @@ -93,6 +97,9 @@ def test_un_pack(self):
self.assertEqual(2, len(b))
self.assertEqual([b'foobar'], b['User-Name'])
self.assertEqual([b'raboof'], b['User-Password'])
self.assertEqual(
[('User-Name', ['foobar']), ('User-Password', ['raboof'])],
list(a.nameditems()))


class MessageTestCase(unittest.TestCase):
Expand Down

0 comments on commit a1a4b78

Please sign in to comment.