Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 4.1.2
current_version = 4.1.3
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
24 changes: 24 additions & 0 deletions .github/workflows/autodeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Auto Deploy
on:
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: 'Wait for status checks'
id: waitforstatuschecks
uses: "fcurella/github-action-wait-for-status@ignore-contexts"
with:
ignoreActions: release
ignoreContexts: coverage/coveralls
checkInterval: 12
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: 'placeholder'
run: "echo hurray"
if: steps.waitforstatuschecks.outputs.status == 'success'
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
LABELS: release
12 changes: 11 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
Changelog
=========

`4.1.2 - 1&-August-2020 <https://github.com/joke2k/faker/compare/v4.1.1...v4.1.2>`__
`4.1.3 - 14-September-2020 <https://github.com/joke2k/faker/compare/v4.1.2...v4.1.3>`__
---------------------------------------------------------------------------------------

* Add ``es_ES`` autonomous communities (Spanish regions). Thanks @mondeja.
* Add JSON and Fixed Width argument group and parser support. Thanks @johnbrandborg.
* Update ``zh_CN`` ssn provider to support gender. Thanks @mapoor.
* Fix typo in ``de_DE`` job provider. Thanks @datadominik.
* ``or_IN`` Odia person's name added. Thanks @soumendrak.
* Remove ``datetime_safe`` shim subclass in favor of native Python ``datetime.datetime``. Thanks @samcrang.

`4.1.2 - 17-August-2020 <https://github.com/joke2k/faker/compare/v4.1.1...v4.1.2>`__
------------------------------------------------------------------------------------

* Extend Person Provider to support non-binary suffixes and prefixes. Thank you @crd.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.2
4.1.3
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
# built documents.
#
# The short X.Y version.
version = '4.1.2'
version = '4.1.3'
# The full version, including alpha/beta/rc tags.
release = '4.1.2'
release = '4.1.3'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion faker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from faker.generator import Generator # noqa F401
from faker.proxy import Faker # noqa F401

VERSION = '4.1.2'
VERSION = '4.1.3'
1 change: 0 additions & 1 deletion faker/providers/company/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ class Provider(BaseProvider):
'web-enabled',
'interactive',
'dot-com',
'sexy',
'back-end',
'real-time',
'efficient',
Expand Down
5 changes: 5 additions & 0 deletions tests/providers/test_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,11 @@ def test_floor_unit_number(self, faker, num_samples):
assert 2 <= int(number[:-2]) <= 99
assert 1 <= int(number[-2:]) <= 40

def test_ordinal_floor_number(self, faker, num_samples):
for _ in range(num_samples):
floor_number = faker.ordinal_floor_number()
assert floor_number[-2:] in ['th', 'st', 'nd', 'rd']

def test_address(self, faker, num_samples):
for _ in range(num_samples):
address = faker.address()
Expand Down
18 changes: 18 additions & 0 deletions tests/providers/test_ssn.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,24 @@ def test_ssn(self):
assert re.search(r'^\d{11}$', value)
assert value.endswith('0')

@freezegun.freeze_time('2002-01-01')
def test_ssn_2000(self):
self.fake.random = random2.Random()

self.fake.seed_instance(0)
value = self.fake.ssn(min_age=0, max_age=1)
assert re.search(r'^\d{11}$', value)
assert value[0] in ('5', '6')

@freezegun.freeze_time('2101-01-01')
def test_ssn_2100(self):
self.fake.random = random2.Random()

self.fake.seed_instance(0)
value = self.fake.ssn(min_age=0, max_age=1)
assert re.search(r'^\d{11}$', value)
assert value[0] in ('7', '8')

def test_vat_id(self):
for _ in range(100):
assert re.search(r'^EE\d{9}$', self.fake.vat_id())
Expand Down