def chamber_label(self): """User-friendly label for chamber of congress.""" return utils.chamber_label(self.chamber)
def test_higher_chamber_label(self): assert utils.chamber_label('upper') == constants.CHAMBER_LABELS[ constants.Chamber.UPPER]
def test_invalid_input(self): with assert_log_warning(): assert utils.chamber_label('not valid') == ''
def test_lower_chamber_label(self): assert utils.chamber_label('lower') == constants.CHAMBER_LABELS[ constants.Chamber.LOWER]
def test_null_input(self): with pytest.raises(ValueError): utils.chamber_label(None)