Skip to content

Instantly share code, notes, and snippets.

@G-Goldstein
Last active July 5, 2016 09:48
Show Gist options
  • Save G-Goldstein/08025869df48dbcae55c98f07f39ee12 to your computer and use it in GitHub Desktop.
Save G-Goldstein/08025869df48dbcae55c98f07f39ee12 to your computer and use it in GitHub Desktop.
def all_possible_ips():
for number in range(255):
yield '172.31.32.' + str(number)
#########################################################
import unittest
class SaunaTests(unittest.TestCase):
def test_for_valid_ip_172_31_32_1(self):
assert '172.31.32.1' in all_possible_ips()
def test_for_valid_ip_172_31_32_20(self):
assert '172.31.32.20' in all_possible_ips()
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment