Skip to content

Releases: omaciel/fauxfactory

v2.1.0

31 Mar 00:42
Compare
Choose a tag to compare

All methods now allow you to provide a callable which will be used to filter values being returned, the number of tries, and a default value to be returned if the filter cannot match the values being generated after the number of tries. (2a7523, @renzon)

v2.0.9

12 Jan 19:52
Compare
Choose a tag to compare
  • Force randomness every time random is used to make sure
    that unique values are generated when running on multi-process
    environments, such as py.test with the pytest-xdist plugin.

v2.0.8

18 Sep 13:47
b320f46
Compare
Choose a tag to compare
  • Updated the gen_mac method to allow the generation of unicast/multicast and globally/locally MAC addresses.

v2.0.7

28 May 16:32
13cc2c5
Compare
Choose a tag to compare
  • Updated the gen_ipaddr method to allow the generation of IP
    addresses that start with a valid range prefix. (048715d, @mfalesni)

v2.0.6

24 Feb 18:58
Compare
Choose a tag to compare

Thanks to James Laska FauxFactory is now compatible with python 2.6.

v2.0.5

16 Feb 22:18
Compare
Choose a tag to compare

Improved unicode letters generator

Added a new helper for the gen_utf8 function which improves how we generate unicode letters and avoids generating unicode string with control characters and other non letters characters.

Also adds tests for the generator in order to ensure it is not generating unwanted characters.

v2.0.4

19 Dec 15:06
Compare
Choose a tag to compare
  • Altered gen_integer to properly check for long() on Python 2.

v2.0.3

17 Dec 17:09
Compare
Choose a tag to compare

2.0.3 (2014-12-17)

  • Dropped the class-wide FauxFactory deprecation warning.
  • Refactored the deprecated decorator function to comply with pylint
    and flake8.
  • Make gen_netmask verify function arguments.
  • Make gen_netmask raise a ValueError if min_cidr is less than
    0 or max_cidr is greater than 32. Add tests for this boundary
    checking code.
  • Improvements to constants and documentation.

v2.0.2

06 Oct 21:41
Compare
Choose a tag to compare

Added new netmask random generator, thanks to @elyezer! You can now generate a netmask value using:

from fauxfactory import gen_netmask

gen_netmask()
u'255.255.255.252'

You can also generate a netmask value that falls within valid CIDR values:

gen_netmask(min_cidr=4)
u'255.255.255.252'

gen_netmask(min_cidr=4, max_cidr=10)
u'252.0.0.0'

v2.0.1

02 Oct 19:41
Compare
Choose a tag to compare

What's new? Basically:

  • If your code still uses the older code and imports the FauxFactory class or tries to use one of its functions, a deprecation message is now displayed:
In [1]: from fauxfactory import FauxFactory
fauxfactory/__init__.py:721: Warning: The FauxFactory class is deprecated. Please use functions from the fauxfactory module instead.
  category=Warning)

In [2]: FauxFactory.generate_utf8()
fauxfactory/__init__.py:697: Warning: Function generate_utf8 is now deprecated! Please update your your code to use the gen_utf8 function instead.
  warnings.warn(warn_message.format(name, new_name), category=Warning)
Out[2]: u'\u3ca8\ucc98\uaf06\uef9c\uc7e7\ub10f\u8554\u8ec0\uf64c\ub6a1'
  • The gen_string function now has a default for the length argument, which means that you can call gen_string('utf8') without having to pass a default value.
In [1]: from fauxfactory import gen_string

In [2]: gen_string('utf8')
Out[2]: u'\u0d53\ufebf\u336b\uffb1\u3899\u3c4d\u1d2b\ub9f9\u0f36\uef60'

... and that's all for now :)