-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for enable/disable MAC Co-authored-by: Edward Delaporte <[email protected]> Co-authored-by: Michelle Pitcel <[email protected]> Co-authored-by: Tyler Turner <[email protected]> Co-authored-by: Zach Carrington <[email protected]>
- Loading branch information
1 parent
298e9d3
commit 384db20
Showing
8 changed files
with
578 additions
and
22 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,100 @@ | ||
interactions: | ||
- request: | ||
body: '{"grant_type": "password", "username": "JOE", "password": "NOTAPASSWORD", | ||
"client_id": "FAKEID", "client_secret": "NOTASECRET"}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '238' | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- python-requests/2.32.3 | ||
method: POST | ||
uri: https://notauri.edu/api/oauth | ||
response: | ||
body: | ||
string: '{"access_token": "NOTASECRET"}' | ||
headers: | ||
Cache-Control: | ||
- no-store | ||
Connection: | ||
- Keep-Alive | ||
Content-Length: | ||
- '172' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Mon, 05 Aug 2024 16:40:43 GMT | ||
Expires: | ||
- Thu, 19 Nov 1981 08:52:00 GMT | ||
Keep-Alive: | ||
- timeout=4, max=500 | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- Apache | ||
Set-Cookie: NO-COOKIE-FOR-YOU | ||
Vary: | ||
- X-Forwarded-For | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-XSS-Protection: | ||
- 1;mode=block | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Authorization: | ||
- Bearer FAKE_TOKEN | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- python-requests/2.32.3 | ||
method: GET | ||
uri: https://notauri.edu/api/endpoint/mac-address/deadbeef1234 | ||
response: | ||
body: | ||
string: '{"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html","title":"Not | ||
Found","status":404,"detail":"Object not found"}' | ||
headers: | ||
Cache-Control: | ||
- no-store, no-cache, must-revalidate | ||
Connection: | ||
- Keep-Alive | ||
Content-Length: | ||
- '126' | ||
Content-Type: | ||
- application/problem+json | ||
Date: | ||
- Mon, 05 Aug 2024 16:40:43 GMT | ||
Expires: | ||
- Thu, 19 Nov 1981 08:52:00 GMT | ||
Keep-Alive: | ||
- timeout=4, max=500 | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- Apache | ||
Set-Cookie: NO-COOKIE-FOR-YOU | ||
Vary: | ||
- X-Forwarded-For | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-XSS-Protection: | ||
- 1;mode=block | ||
status: | ||
code: 404 | ||
message: Not Found | ||
version: 1 |
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,100 @@ | ||
interactions: | ||
- request: | ||
body: '{"grant_type": "password", "username": "JOE", "password": "NOTAPASSWORD", | ||
"client_id": "FAKEID", "client_secret": "NOTASECRET"}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '238' | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- python-requests/2.32.3 | ||
method: POST | ||
uri: https://notauri.edu/api/oauth | ||
response: | ||
body: | ||
string: '{"access_token": "NOTASECRET"}' | ||
headers: | ||
Cache-Control: | ||
- no-store | ||
Connection: | ||
- Keep-Alive | ||
Content-Length: | ||
- '172' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Mon, 05 Aug 2024 16:40:44 GMT | ||
Expires: | ||
- Thu, 19 Nov 1981 08:52:00 GMT | ||
Keep-Alive: | ||
- timeout=4, max=500 | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- Apache | ||
Set-Cookie: NO-COOKIE-FOR-YOU | ||
Vary: | ||
- X-Forwarded-For | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-XSS-Protection: | ||
- 1;mode=block | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Authorization: | ||
- Bearer FAKE_TOKEN | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- python-requests/2.32.3 | ||
method: GET | ||
uri: https://notauri.edu/api/endpoint/mac-address/deadbeef1234 | ||
response: | ||
body: | ||
string: '{"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html","title":"Not | ||
Found","status":404,"detail":"Object not found"}' | ||
headers: | ||
Cache-Control: | ||
- no-store, no-cache, must-revalidate | ||
Connection: | ||
- Keep-Alive | ||
Content-Length: | ||
- '126' | ||
Content-Type: | ||
- application/problem+json | ||
Date: | ||
- Mon, 05 Aug 2024 16:40:44 GMT | ||
Expires: | ||
- Thu, 19 Nov 1981 08:52:00 GMT | ||
Keep-Alive: | ||
- timeout=4, max=500 | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- Apache | ||
Set-Cookie: NO-COOKIE-FOR-YOU | ||
Vary: | ||
- X-Forwarded-For | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-XSS-Protection: | ||
- 1;mode=block | ||
status: | ||
code: 404 | ||
message: Not Found | ||
version: 1 |
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,154 @@ | ||
interactions: | ||
- request: | ||
body: '{"grant_type": "password", "username": "JOE", "password": "NOTAPASSWORD", | ||
"client_id": "FAKEID", "client_secret": "NOTASECRET"}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '238' | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- python-requests/2.32.3 | ||
method: POST | ||
uri: https://notauri.edu/api/oauth | ||
response: | ||
body: | ||
string: '{"access_token": "NOTASECRET"}' | ||
headers: | ||
Cache-Control: | ||
- no-store | ||
Connection: | ||
- Keep-Alive | ||
Content-Length: | ||
- '172' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Mon, 05 Aug 2024 16:31:44 GMT | ||
Expires: | ||
- Thu, 19 Nov 1981 08:52:00 GMT | ||
Keep-Alive: | ||
- timeout=4, max=500 | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- Apache | ||
Set-Cookie: NO-COOKIE-FOR-YOU | ||
Vary: | ||
- X-Forwarded-For | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-XSS-Protection: | ||
- 1;mode=block | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Authorization: | ||
- Bearer FAKE_TOKEN | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- python-requests/2.32.3 | ||
method: GET | ||
uri: https://notauri.edu/api/endpoint/mac-address/123123123123 | ||
response: | ||
body: | ||
string: '{"id":4524,"mac_address":"123123123123","status":"Known","randomized_mac":true,"attributes":{},"added_at":"Nov | ||
15, 2023 14:52:34 CST","updated_at":"Aug 05, 2024 11:27:32 CDT","_stuff":"deleted"}' | ||
headers: | ||
Cache-Control: | ||
- no-store, no-cache, must-revalidate | ||
Connection: | ||
- Keep-Alive | ||
Content-Length: | ||
- '267' | ||
Content-Type: | ||
- application/hal+json | ||
Date: | ||
- Mon, 05 Aug 2024 16:31:45 GMT | ||
Expires: | ||
- Thu, 19 Nov 1981 08:52:00 GMT | ||
Keep-Alive: | ||
- timeout=4, max=500 | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- Apache | ||
Set-Cookie: NO-COOKIE-FOR-YOU | ||
Vary: | ||
- X-Forwarded-For | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-XSS-Protection: | ||
- 1;mode=block | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: '{"id": 4524, "mac_address": "123123123123", "status": "Disabled", "attributes": | ||
{"Disabled By": "TESTING", "Disabled Reason": "Still testing..."}}' | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Authorization: | ||
- Bearer FAKE_TOKEN | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '146' | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- python-requests/2.32.3 | ||
method: PUT | ||
uri: https://notauri.edu/api/endpoint/4524 | ||
response: | ||
body: | ||
string: '{"id":4524,"mac_address":"123123123123","status":"Disabled","randomized_mac":true,"attributes":{"Disabled | ||
By":"TESTING","Disabled Reason":"Still testing..."},"added_at":"Nov 15, 2023 | ||
14:52:34 CST","updated_at":"Aug 05, 2024 11:31:45 CDT","stuff":"deleted"}' | ||
headers: | ||
Cache-Control: | ||
- no-store, no-cache, must-revalidate | ||
Connection: | ||
- Keep-Alive | ||
Content-Length: | ||
- '330' | ||
Content-Type: | ||
- application/hal+json | ||
Date: | ||
- Mon, 05 Aug 2024 16:31:45 GMT | ||
Expires: | ||
- Thu, 19 Nov 1981 08:52:00 GMT | ||
Keep-Alive: | ||
- timeout=4, max=500 | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- Apache | ||
Set-Cookie: NO-COOKIE-FOR-YOU | ||
Vary: | ||
- X-Forwarded-For | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-XSS-Protection: | ||
- 1;mode=block | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
Oops, something went wrong.