Changeset 6615d91 in mod_gnutls


Ignore:
Timestamp:
Dec 27, 2019, 3:15:03 PM (10 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
master, proxy-ticket
Children:
7089dbc
Parents:
3039495
Message:

Use dynamic class constructor in _from_yaml classmethods

This makes it possible to re-use the methods for subclasses.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/mgstest/tests.py

    r3039495 r6615d91  
    108108    def _from_yaml(cls, loader, node):
    109109        fields = loader.construct_mapping(node)
    110         conn = TestConnection(**fields)
     110        conn = cls(**fields)
    111111        return conn
    112112
     
    232232    def _from_yaml(cls, loader, node):
    233233        fields = loader.construct_mapping(node)
    234         req = TestRequest(**fields)
     234        req = cls(**fields)
    235235        return req
    236236
Note: See TracChangeset for help on using the changeset viewer.