def test_level_of_freedom(self):
    data = [('by', FREEDOM_LEVEL_MAX), ('devnations', FREEDOM_LEVEL_MIN), ('sampling', FREEDOM_LEVEL_MIN), ('sampling+', FREEDOM_LEVEL_MID), ('by-nc', FREEDOM_LEVEL_MID), ('by-nd', FREEDOM_LEVEL_MID), ('by-sa', FREEDOM_LEVEL_MAX)]
    for (license_code, expected_freedom) in data:
        with self.subTest(license_code):
            license = LicenseFactory(license_code=license_code)
            self.assertEqual(expected_freedom, license.level_of_freedom)
def test_level_of_freedom(self):
    data = [('by', FREEDOM_LEVEL_MAX), ('devnations', FREEDOM_LEVEL_MIN), ('sampling', FREEDOM_LEVEL_MIN), ('sampling+', FREEDOM_LEVEL_MID), ('by-nc', FREEDOM_LEVEL_MID), ('by-nd', FREEDOM_LEVEL_MID), ('by-sa', FREEDOM_LEVEL_MAX)]
    for (license_code, expected_freedom) in data:
        with self.subTest(license_code):
            license = LicenseFactory(license_code=license_code)
            self.assertEqual(expected_freedom, license.level_of_freedom)