bpo-40084: Enum - dir() includes member attributes (GH-19219)

This commit is contained in:
Angelin BOOZ 2020-09-21 15:11:06 +02:00 committed by GitHub
parent 1b328ea9a7
commit 68526fe258
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 2 deletions

View file

@ -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