Skip to content

Commit

Permalink
tests for expired and disabled user/macs
Browse files Browse the repository at this point in the history
  • Loading branch information
seanenck committed Feb 16, 2017
1 parent a826d6d commit 6a75473
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mods-config/python/tests/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
],
"pass": "12345678910aaaaaaaaaaaaaaa111213141516etcabc"
},
"dev.disable": {
"attr": [],
"macs": [
"001122334455"
],
"pass": "12345d678910aaaaaaaaaaaaaaa111213141516etc"
},
"dev.user1": {
"attr": [],
"macs": [
Expand Down
9 changes: 9 additions & 0 deletions mods-config/python/tests/user_disable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import __config__
import common
disabled = "11ff33445566"
normal = __config__.Assignment()
normal.macs = [common.VALID_MAC]
normal.password = "12345d678910aaaaaaaaaaaaaaa111213141516etc"
normal.bypass = [disabled]
normal.disable = { disabled: "2017-01-01" }
normal.vlan = "dev"
7 changes: 7 additions & 0 deletions mods-config/python/tests/user_expire.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import __config__
import common
normal = __config__.Assignment()
normal.macs = [common.VALID_MAC]
normal.password = "12345aaa678910aaaaaaaaaaaaaaa111213141516etc"
normal.vlan = "dev"
normal.expired = "2017-01-01"

0 comments on commit 6a75473

Please sign in to comment.