From 68526fe258da8c01196fd7cf48e8e5f1280bf8fd Mon Sep 17 00:00:00 2001 From: Angelin BOOZ <9497359+lem2clide@users.noreply.github.com> Date: Mon, 21 Sep 2020 15:11:06 +0200 Subject: bpo-40084: Enum - dir() includes member attributes (GH-19219) --- Lib/test/test_httplib.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Lib/test/test_httplib.py') diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index a3f268be97..4abff60230 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -1,5 +1,5 @@ import errno -from http import client +from http import client, HTTPStatus import io import itertools import os @@ -519,6 +519,10 @@ class TransferEncodingTest(TestCase): class BasicTest(TestCase): + def test_dir_with_added_behavior_on_status(self): + # see issue40084 + self.assertTrue({'description', 'name', 'phrase', 'value'} <= set(dir(HTTPStatus(404)))) + def test_status_lines(self): # Test HTTP status lines -- cgit v1.2.1