jeffsilverm / nbmdt

network boot, monitor, and diagnostic tool
GNU General Public License v2.0
2 stars 0 forks source link

running pytest test_nbmdt.py gives attribute errors in TestIPv4Route #34

Open jeffsilverm opened 5 years ago

jeffsilverm commented 5 years ago

When I give the command pytest pytest --color=yes test_nbmdt.py | less -r

I get 4 attribute errors, all involving `no attribute 'route_test':

E AttributeError: 'TestIPv4Route' object has no attribute 'route_list'

(general) jeffs@Jeffs-Win-10-laptop:~/ubuntu/python/nbmdt$ fgrep IPv4_route *.py */*.py network.py: """This method produces a nice string representation of a IPv4_route object""" network.py: """This method produces a nice string representation of a IPv4_route object""" routes.py: route_list.append(self.IPv4_route(name=name, routes.py: """This method produces a nice string representation of a IPv4_route object""" test_nbmdt.py: self.route_list = nbmdt.IPv4_route.find_ipv4_routes() test_nbmdt.py: self.assertIsInstance(r, nbmdt.IPv4_route ) utilities.py: # ipv4_routes = IPv4_route.find_ipv4_routes() (general) jeffs@Jeffs-Win-10-laptop:~/ubuntu/python/nbmdt$

One thing I notice is that there are two files that do the same thing: network.py and route.py. There should be one file, network.py, because that is the name of the level. It does routing, to be sure.

jeffsilverm commented 5 years ago

networks.py should never have existed. git rm networks.py

jeffsilverm commented 5 years ago

File class IPv4_address show inherit from the standard library class ipaddress and class Layer in file layer.py