Skip to content

Commit

Permalink
Merge pull request #486 from J535D165/master
Browse files Browse the repository at this point in the history
Make it possible to seed uuid4 property #484
  • Loading branch information
fcurella committed Mar 20, 2017
2 parents 4f66c07 + 7229f42 commit a50e9b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion faker/providers/misc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def uuid4(cls):
"""
Generates a random UUID4 string.
"""
return str(uuid.uuid4())
# Based on http://stackoverflow.com/q/41186818
return str(uuid.UUID(int=random.getrandbits(128)))

@classmethod
def password(cls, length=10, special_chars=True, digits=True, upper_case=True, lower_case=True):
Expand Down

0 comments on commit a50e9b8

Please sign in to comment.