Skip to content

Commit 72fe318

Browse files
authored
Python Part 3 tests (#53)
* Python Part 3 tests * Adds pysnmp to requriements.txt and extra error message
1 parent d07ce63 commit 72fe318

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.github/workflows/python-app.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,29 @@ jobs:
3131
cd programming_fundamentals/python_part_2
3232
pip install -r requirements.txt
3333
python example1.py
34+
- name: Test Programming Fundamentals Python Part 3 - ncclient
35+
run: |
36+
cd programming_fundamentals/python_part_3
37+
pip install -r requirements.txt
38+
python api_ncclient_example.py
39+
- name: Test Programming Fundamentals Python Part 3 - netmiko
40+
run: |
41+
cd programming_fundamentals/python_part_3
42+
pip install -r requirements.txt
43+
python api_netmiko_example.py
44+
- name: Test Programming Fundamentals Python Part 3 - pysnmp
45+
run: |
46+
cd programming_fundamentals/python_part_3
47+
pip install -r requirements.txt
48+
python api_pysnmp_example.py
49+
- name: Test Programming Fundamentals Python Part 3 - requests
50+
run: |
51+
cd programming_fundamentals/python_part_3
52+
pip install -r requirements.txt
53+
python api_requests_example.py
54+
- name: Test Programming Fundamentals Python Part 3 - data_library_exercises
55+
run: |
56+
cd programming_fundamentals/python_part_3
57+
pip install -r requirements.txt
58+
python data_library_exercises.py
59+

programming_fundamentals/python_part_3/api_pysnmp_example.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
if errorIndication: # SNMP engine errors
3636
print(errorIndication)
37+
print("Check to be sure you're connected to the VPN for the DevNet Sandbox.")
3738
else:
3839
if errorStatus: # SNMP agent errors
3940
print('%s at %s' % (errorStatus.prettyPrint(),

programming_fundamentals/python_part_3/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ netmiko>=3.3.2
33
pyyaml>=5.3.1
44
requests>=2.25.1
55
xmltodict>=0.12.0
6+
pysnmp>=4.4.12

0 commit comments

Comments
 (0)