Exemplo n.º 1
0
class RandEnumKeys(RandEnum):
    """Picks a random value from dict keys list. Used for fuzzing enum fields.

    """
    def __init__(self, enum):
        self.enum = []
        for key in list(enum.keys()):
            self.enum.append(key)
        self.seq = RandomEnumeration(0, len(list(enum.keys())) - 1)

    def _fix(self):
        return self.enum[self.seq.next()]
Exemplo n.º 2
0
class RandEnumKeys(RandEnum):
    """Picks a random value from dict keys list. Used for fuzzing enum fields.

    """
    def __init__(self, enum):
        self.enum = []
        for key in list(enum.keys()):
            self.enum.append(key)
        self.seq = RandomEnumeration(0, len(list(enum.keys())) - 1)

    def _fix(self):
        return self.enum[self.seq.next()]
Exemplo n.º 3
0
 def __init__(self, enum):
     self.enum = []
     for key in list(enum.keys()):
         self.enum.append(key)
     self.seq = RandomEnumeration(0, len(list(enum.keys())) - 1)
Exemplo n.º 4
0
 def __init__(self, enum):
     self.enum = []
     for key in list(enum.keys()):
         self.enum.append(key)
     self.seq = RandomEnumeration(0, len(list(enum.keys())) - 1)