nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: joke2k/faker
Pull request #277 (2015-08-01 00:58:19)

added support for brazilian SSN (called CPF)
added support for brazilian SSN (called CPF)


Patch:
diff --git a/faker/providers/ssn/pt_BR/__init__.py b/faker/providers/ssn/pt_BR/__init__.py
new file mode 100644
index 00000000..d039b4ab
--- /dev/null
+++ b/faker/providers/ssn/pt_BR/__init__.py
@@ -0,0 +1,43 @@
+#  -*- coding: utf-8 -*-
+
+from __future__ import unicode_literals
+from .. import Provider as SsnProvider
+from faker.generator import random
+
+
+def checksum(digits):
+    s = 0
+    p = len(digits) + 1
+    for i in range(0, len(digits)):
+        s += digits[i] * p
+        p -= 1
+
+    reminder = s % 11
+    if reminder == 0 or reminder == 1:
+        return 1
+    else:
+        return 11 - reminder
+
+
+class Provider(SsnProvider):
+    """
+    Provider for Brazilian SSN also known in Brazil as CPF.
+    There are two methods Provider.ssn and Provider.cpf
+    The snn returns a valid number with numbers only
+    The cpf return a valid number formatted with brazilian mask. eg nnn.nnn.nnn-nn
+    """
+
+    @classmethod
+    def ssn(cls):
+        digits = random.sample(range(10), 9)
+
+        dv = checksum(digits)
+        digits.append(dv)
+        digits.append(checksum(digits))
+
+        return ''.join(map(str, digits))
+
+    @classmethod
+    def cpf(cls):
+        c = Provider.ssn()
+        return c[:3] + '.' + c[3:6] + '.' + c[6:9] + '-' + c[9:]


Test patch:
diff --git a/faker/tests/pt_BR/__init__.py b/faker/tests/pt_BR/__init__.py
new file mode 100644
index 00000000..68e0d254
--- /dev/null
+++ b/faker/tests/pt_BR/__init__.py
@@ -0,0 +1,26 @@
+#  -*- coding: utf-8 -*-
+
+from __future__ import unicode_literals
+
+import unittest
+import re
+
+from faker import Factory
+from faker.providers.ssn.pt_BR import Provider, checksum
+
+
+class pt_BR_FactoryTestCase(unittest.TestCase):
+    def setUp(self):
+        self.factory = Factory.create('pt_BR')
+
+    def test_pt_BR_ssn_checksum(self):
+        self.assertEqual(checksum([8, 8, 2, 8, 2, 1, 6, 5, 2]), 2)
+        self.assertEqual(checksum([8, 8, 2, 8, 2, 1, 6, 5, 2, 2]), 1)
+
+    def test_pt_BR_ssn(self):
+        for i in range(100):
+            self.assertTrue(re.search(r'^\d{11}$', Provider.ssn()))
+
+    def test_pt_BR_cpf(self):
+        for i in range(100):
+            self.assertTrue(re.search(r'\d{3}\.\d{3}\.\d{3}\-\d{2}', Provider.cpf()))
Repository: joke2k/faker
Pull request #329 (2016-02-23 14:29:54)

Fix randomly produced language codes.
First commit shows that the `cn` language code is not recognised by the `Factory` constructor.

Second commit replace `cn` by `zh`, the former being the Chinese TLD, not Chinese's language code.


Patch:
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index f1d80fd3..eea18cc0 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -27,6 +27,9 @@ Changelog
 * Allow generation of IPv4 and IPv6 network address with valid CIDR. Thanks @kdeldycke.
 * Unittest IPv4 and IPv6 address and network generation. Thanks @kdeldycke.
 * Add a new provider to generate random binary blob. Thanks @kdeldycke.
+* Check that randomly produced language codes are parseable as locale by the
+  factory constructor. Thanks @kdeldycke.
+* Fix chinese random language code. Thanks @kdeldycke.
 
 `0.5.3 - 21-September-2015 <http://github.com/joke2k/faker/compare/v0.5.2...v0.5.3>`__
 --------------------------------------------------------------------------------------
diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py
index 2cfecb12..70106689 100644
--- a/faker/providers/misc/__init__.py
+++ b/faker/providers/misc/__init__.py
@@ -13,7 +13,7 @@ from .. import BaseProvider
 
 
 class Provider(BaseProvider):
-    language_codes = ('cn', 'de', 'el', 'en', 'es', 'fr', 'it', 'pt', 'ru')
+    language_codes = ('zh', 'de', 'el', 'en', 'es', 'fr', 'it', 'pt', 'ru')
 
     @classmethod
     def boolean(cls, chance_of_getting_true=50):


Test patch:
diff --git a/faker/tests/__init__.py b/faker/tests/__init__.py
index 68129f9d..6d35c9de 100644
--- a/faker/tests/__init__.py
+++ b/faker/tests/__init__.py
@@ -471,6 +471,14 @@ class FactoryTestCase(unittest.TestCase):
             self.assertTrue(isinstance(binary, six.binary_type))
             self.assertTrue(len(binary) == length)
 
+    def test_language_code(self):
+        from faker.providers.misc import Provider
+
+        for _ in range(99):
+            language_code = Provider.language_code()
+            self.assertTrue(isinstance(language_code, string_types))
+            Factory.create(locale=language_code)
+
     def test_password(self):
         from faker.providers.misc import Provider
Repository: joke2k/faker
Pull request #336 (2016-03-05 07:17:39)

Add date handling for datetime functions
faker v0.5.4 introduced timezone handling to datetime functions. This however broke compatibility when using dates instead of datetimes. eg, `date_time_between_dates`.


Patch:
diff --git a/faker/providers/date_time/__init__.py b/faker/providers/date_time/__init__.py
index 5f9b50e7..13e63166 100644
--- a/faker/providers/date_time/__init__.py
+++ b/faker/providers/date_time/__init__.py
@@ -17,7 +17,7 @@ from .. import BaseProvider
 
 
 def datetime_to_timestamp(dt):
-    if dt.tzinfo is not None:
+    if getattr(dt, 'tzinfo', None) is not None:
         dt = dt.astimezone(tzlocal())
     return mktime(dt.timetuple())
 


Test patch:
diff --git a/faker/tests/__init__.py b/faker/tests/__init__.py
index 6d35c9de..b6337d50 100644
--- a/faker/tests/__init__.py
+++ b/faker/tests/__init__.py
@@ -327,6 +327,12 @@ class FactoryTestCase(unittest.TestCase):
         now_back = datetime.datetime.fromtimestamp(timestamp, utc)
         self.assertEqual(now, now_back)
 
+        today = datetime.date.today()
+        timestamp = datetime_to_timestamp(today)
+        today_as_dt = datetime.datetime.combine(today, datetime.time.min)
+        today_back = datetime.datetime.fromtimestamp(timestamp)
+        self.assertEqual(today_as_dt, today_back)
+
     def test_datetime_safe(self):
         from faker.utils import datetime_safe
         # test using example provided in module
Repository: joke2k/faker
Pull request #347 (2016-04-05 22:13:05)

Add method to specify a random string of minimum and maximum length.
Added a string method in the **misc** provider to generate a random string of min and max length.


Patch:
diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py
index 70106689..2cd1d981 100644
--- a/faker/providers/misc/__init__.py
+++ b/faker/providers/misc/__init__.py
@@ -126,4 +126,4 @@ class Provider(BaseProvider):
         for i, index in enumerate(random_indexes):
             chars[index] = required_tokens[i]
 
-        return ''.join(chars)
+        return ''.join(chars)
\ No newline at end of file
diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index 4e5477b8..8747ed5a 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -6,6 +6,7 @@ from decimal import Decimal
 import sys
 
 from faker.providers.lorem.la import Provider as Lorem
+from faker.generator import random
 
 from .. import BaseProvider
 
@@ -24,8 +25,18 @@ class Provider(BaseProvider):
         return cls.random_int(0, 1) == 1
 
     @classmethod
-    def pystr(cls, max_chars=20):
-        return "".join(cls.random_letter() for i in range(max_chars))
+    def pystr(cls, min_chars=None, max_chars=20):
+        """
+        Generates a random string of upper and lowercase letters.
+        :type min_chars: int
+        :type max_chars: int
+        :return: String. Random of random length between min and max characters.
+        """
+        if min_chars is None:
+            return "".join(cls.random_letter() for i in range(max_chars))
+        else:
+            assert (max_chars >= min_chars), "Maximum length must be greater than or equal to minium length"
+            return "".join(cls.random_letter() for i in range(0, random.randint(min_chars, max_chars)))
 
     @classmethod
     def pyfloat(cls, left_digits=None, right_digits=None, positive=False):


Test patch:
diff --git a/faker/tests/__init__.py b/faker/tests/__init__.py
index b6337d50..1e997f91 100644
--- a/faker/tests/__init__.py
+++ b/faker/tests/__init__.py
@@ -537,7 +537,8 @@ class FactoryTestCase(unittest.TestCase):
         self.assertEqual(characters, '')
         characters = provider.pystr(max_chars=-10)
         self.assertEqual(characters, '')
-
+        characters = provider.pystr(min_chars=10, max_chars=255)
+        self.assertTrue((len(characters) >= 10))
 
     def test_us_ssn_valid(self):
         from faker.providers.ssn.en_US import Provider
Repository: joke2k/faker
Pull request #383 (2016-09-08 20:22:54)

adding support for croatian ssn (oib)


Patch:
diff --git a/faker/providers/ssn/hr_HR/__init__.py b/faker/providers/ssn/hr_HR/__init__.py
new file mode 100644
index 00000000..f110a5e9
--- /dev/null
+++ b/faker/providers/ssn/hr_HR/__init__.py
@@ -0,0 +1,43 @@
+#  -*- coding: utf-8 -*-
+
+from __future__ import unicode_literals
+from .. import Provider as SsnProvider
+from faker.generator import random
+
+
+def checksum(digits):
+    """
+    Calculate and return control digit for given list of digits based on
+    ISO7064, MOD 11,10 standard.
+    """
+    remainder = 10
+    for digit in digits:
+        remainder = (remainder + digit) % 10
+        if remainder == 0:
+            remainder = 10
+        remainder = (remainder * 2) % 11
+
+    control_digit = 11 - remainder
+    if control_digit == 10:
+        control_digit = 0
+    return control_digit
+
+
+class Provider(SsnProvider):
+    """
+    The Personal identification number (Croatian: Osobni identifikacijski
+    broj or OIB) is a permanent national identification number of every
+    Croatian citizen and legal persons domiciled in the Republic of Croatia.
+
+    OIB consists of 11 digits which contain no personal information. The OIB
+    is constructed from ten randomly chosen digits and one digit control number
+    (international standard ISO 7064, module 11.10).
+    """
+
+    @classmethod
+    def ssn(cls):
+        digits = random.sample(range(10), 10)
+
+        digits.append(checksum(digits))
+
+        return ''.join(map(str, digits))


Test patch:
diff --git a/faker/tests/hr_HR/__init__.py b/faker/tests/hr_HR/__init__.py
new file mode 100644
index 00000000..0c10a486
--- /dev/null
+++ b/faker/tests/hr_HR/__init__.py
@@ -0,0 +1,26 @@
+#  -*- coding: utf-8 -*-
+
+from __future__ import unicode_literals
+
+import unittest
+import re
+
+from faker import Factory
+from faker.providers.ssn.hr_HR import Provider, checksum
+
+
+class hr_HR_FactoryTestCase(unittest.TestCase):
+    def setUp(self):
+        self.factory = Factory.create('hr_HR')
+
+    def test_hr_HR_ssn_checksum(self):
+        self.assertEqual(checksum([0, 0, 2, 2, 8, 2, 6, 9, 2, 8]), 9)
+        self.assertEqual(checksum([5, 8, 9, 3, 6, 9, 5, 1, 2, 5]), 1)
+        self.assertEqual(checksum([5, 7, 8, 0, 2, 0, 3, 4, 2, 3]), 7)
+        self.assertEqual(checksum([4, 3, 3, 3, 1, 4, 6, 7, 6, 2]), 2)
+        self.assertEqual(checksum([0, 5, 9, 3, 7, 7, 5, 9, 1, 8]), 7)
+        self.assertEqual(checksum([7, 1, 1, 4, 9, 9, 1, 2, 4, 1]), 6)
+
+    def test_hr_HR_ssn(self):
+        for i in range(100):
+            self.assertTrue(re.search(r'^\d{11}$', Provider.ssn()))
Repository: joke2k/faker
Pull request #428 (2016-11-20 21:08:16)

Allow left/right_digits=0 for pyfloat (see issue #401)
Setting `left_digits=0` results in purely fractional numbers, allowing to
create e.g. random percentage values for test cases.

Setting `right_digits=0` results in integer values (represented as
floats), allowing to test if they are handled correctly or maybe
rounding is a problem for the use case under test.

Also see discussion for this [commit](https://github.com/illia-v/faker/commit/348a312e1a8378b9a168c7bf22fce8b5be500aad)


Patch:
diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index 729b742b..f310b235 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -40,11 +40,14 @@ class Provider(BaseProvider):
 
     @classmethod
     def pyfloat(cls, left_digits=None, right_digits=None, positive=False):
-        if left_digits is not None and left_digits <= 0:
-            raise ValueError('A float number cannot have less than 1 digit in '
+        if left_digits is not None and left_digits < 0:
+            raise ValueError('A float number cannot have less than 0 digits in its '
                              'integer part')
-        if right_digits is not None and right_digits <= 0:
-            raise ValueError('A float number should have fractional part')
+        if right_digits is not None and right_digits < 0:
+            raise ValueError('A float number cannot have less than 0 digits in its '
+                             'fractional part')
+        if left_digits == 0 and right_digits == 0:
+            raise ValueError('A float number cannot have less than 0 digits in total')
 
         left_digits = left_digits if left_digits is not None else (
             cls.random_int(1, sys.float_info.dig))


Test patch:
diff --git a/faker/tests/__init__.py b/faker/tests/__init__.py
index 7cd289be..5be08e52 100644
--- a/faker/tests/__init__.py
+++ b/faker/tests/__init__.py
@@ -535,14 +535,13 @@ class FactoryTestCase(unittest.TestCase):
         provider = Provider(None)
 
         self.assertTrue(0 <= abs(provider.pyfloat(left_digits=1)) < 10)
+        self.assertTrue(0 <= abs(provider.pyfloat(left_digits=0)) < 1)
+        x=abs(provider.pyfloat(right_digits=0))
+        self.assertTrue(x-int(x) == 0)
         with self.assertRaises(ValueError,
-                               msg='A float number cannot have less than 1 '
-                               'digit in integer part'):
-            provider.pyfloat(left_digits=0)
-        with self.assertRaises(ValueError,
-                               msg='A float number should have fractional '
-                               'part'):
-            provider.pyfloat(right_digits=0)
+                               msg='A float number cannot have 0 digits '
+                               'in total'):
+            provider.pyfloat(left_digits=0, right_digits=0)
 
     def test_us_ssn_valid(self):
         from faker.providers.ssn.en_US import Provider
Repository: joke2k/faker
Pull request #436 (2016-12-20 14:09:09)

Fix no_NO postcodes.
Current implementation of postal codes for `no_NO` locale returns the schema instead of the value:
```python
>>> import faker
>>> faker.VERSION
'0.7.6'
>>> faker.Faker(locale='no_NO').postcode()
u'####'
```

This PR fix this issue.


Patch:
diff --git a/faker/providers/address/no_NO/__init__.py b/faker/providers/address/no_NO/__init__.py
index a512e92c..f3fac17a 100644
--- a/faker/providers/address/no_NO/__init__.py
+++ b/faker/providers/address/no_NO/__init__.py
@@ -27,10 +27,3 @@ class Provider(AddressProvider):
     address_formats = ('{{street_address}}, {{postcode}} {{city}}',)
     building_number_formats = ('#', '#', '#', '#?', '##', '##', '##?')
     postcode_formats = ('####',)
-
-    @classmethod
-    def postcode(cls):
-        """
-        :example 0234
-        """
-        return cls.random_element(cls.postcode_formats)


Test patch:
diff --git a/faker/tests/no_NO/__init__.py b/faker/tests/no_NO/__init__.py
new file mode 100644
index 00000000..4cb0f033
--- /dev/null
+++ b/faker/tests/no_NO/__init__.py
@@ -0,0 +1,18 @@
+# coding=utf-8
+
+from __future__ import unicode_literals
+
+import unittest
+import re
+
+from faker import Factory
+
+
+class no_NO_FactoryTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.factory = Factory.create('no_NO')
+
+    def test_en_GB_postcode(self):
+        for i in range(100):
+            self.assertTrue(re.match(r'^[0-9]{4}$', self.factory.postcode()))
Repository: joke2k/faker
Pull request #445 (2017-01-09 11:50:46)

Update __init__.py
Add new parameter in to classmethod 'random_number'. It's allow to create random number with fixed lenght.


Patch:
diff --git a/faker/providers/__init__.py b/faker/providers/__init__.py
index b16ef334..d01d37a9 100644
--- a/faker/providers/__init__.py
+++ b/faker/providers/__init__.py
@@ -72,17 +72,24 @@ class BaseProvider(object):
             return ''
 
     @classmethod
-    def random_number(cls, digits=None):
+    def random_number(cls, digits=None, fix_len=False):
         """
         Returns a random number with 1 digit (default, when digits==None)
         or a random number with 0 to given number of digits.
+        And a random number with given number to given number of digits
+        (when fix_len==True).
 
         :param digits: maximum number of digits
-        :returns: random number with 0 to given number of digits
+        :param fix_len:  indicator of fixed length
+        :returns: random number with 0 to given number of digits or
+            fixed length number
         """
         if digits is None:
             digits = BaseProvider.random_digit()
-        return random.randint(0, pow(10, digits) - 1)
+        if fix_len:
+            return random.randint(pow(10, digits - 1), pow(10, digits) - 1)
+        else:
+            return random.randint(0, pow(10, digits) - 1)
 
     @classmethod
     def random_letter(cls):


Test patch:
diff --git a/faker/tests/__init__.py b/faker/tests/__init__.py
index 5be08e52..39fdd02b 100644
--- a/faker/tests/__init__.py
+++ b/faker/tests/__init__.py
@@ -17,12 +17,12 @@ import logging
 
 try:
     from mock import patch
-except ImportError:
+except ImportError:  # pragma: no cover
     from unittest.mock import patch
 
 try:
     from StringIO import StringIO
-except ImportError:
+except ImportError:  # pragma: no cover
     from io import StringIO
 
 from faker import Generator, Factory
@@ -31,7 +31,7 @@ from faker.utils import text, decorators
 
 try:
     string_types = (basestring,)
-except NameError:
+except NameError:  # pragma: no cover
     string_types = (str,)
 
 
@@ -656,6 +656,13 @@ class FactoryTestCase(unittest.TestCase):
         with self.assertRaises(ValueError):
             provider.random_sample_unique('abcde', 6)
 
+    def test_random_number(self):
+        from faker.providers import BaseProvider
+        provider = BaseProvider
+
+        number = provider.random_number(10, True)
+        self.assertEqual(len(str(number)), 10)
+
 
 class GeneratorTestCase(unittest.TestCase):
 
@@ -675,4 +682,4 @@ class GeneratorTestCase(unittest.TestCase):
 
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main()  # pragma: no cover
Repository: joke2k/faker
Pull request #504 (2017-04-22 15:26:35)

Added company provider to hu_HU locale
Related to issue #490. 

Looks like ```hu_HU``` locale was missing the company localisation. As a consequence, ```fake.company_suffix()``` was returning English results. 

This has now been fixed with unit tests.

```python setup.py test``` executed locally. All green.

Thank you. 


Patch:
diff --git a/faker/providers/company/hu_HU/__init__.py b/faker/providers/company/hu_HU/__init__.py
new file mode 100644
index 00000000..919e2cc8
--- /dev/null
+++ b/faker/providers/company/hu_HU/__init__.py
@@ -0,0 +1,25 @@
+# coding=utf-8
+
+from __future__ import unicode_literals
+from .. import Provider as CompanyProvider
+
+
+class Provider(CompanyProvider):
+    formats = (
+        '{{last_name}} {{company_suffix}}',
+        '{{last_name}} {{last_name}} {{company_suffix}}',
+        '{{last_name}}'
+    )
+
+    company_suffixes = (
+        'Kft',
+        'és Tsa',
+        'Kht',
+        'ZRT',
+        'NyRT',
+        'BT'
+    )
+
+    @classmethod
+    def company_suffix(cls):
+        return cls.random_element(cls.company_suffixes)


Test patch:
diff --git a/tests/providers/company.py b/tests/providers/company.py
index 22bf5153..1cc87ddf 100644
--- a/tests/providers/company.py
+++ b/tests/providers/company.py
@@ -6,6 +6,7 @@ import unittest
 import re
 
 from faker import Factory
+from faker.providers.company.hu_HU import Provider as HuProvider
 from faker.providers.company.ja_JP import Provider as JaProvider
 from faker.providers.company.pt_BR import Provider as PtProvider, company_id_checksum
 from .. import string_types
@@ -48,3 +49,19 @@ class TestPtBR(unittest.TestCase):
         for _ in range(100):
             cnpj = PtProvider.cnpj()
             self.assertTrue(re.search(r'\d{2}\.\d{3}\.\d{3}/0001-\d{2}', cnpj))
+
+class TestHuHU(unittest.TestCase):
+    """ Tests company in the hu_HU locale """
+
+    def setUp(self):
+        self.factory = Factory.create('hu_HU')
+
+    def test_company_suffix(self):
+        suffixes = HuProvider.company_suffixes
+        suffix = self.factory.company_suffix()
+        assert isinstance(suffix, string_types)
+        assert suffix in suffixes
+
+    def test_company(self):
+        company = self.factory.company()
+        assert isinstance(company, string_types)
Repository: joke2k/faker
Pull request #520 (2017-05-29 07:27:56)

DateTime provider for pl_PL


Patch:
diff --git a/faker/providers/date_time/pl_PL/__init__.py b/faker/providers/date_time/pl_PL/__init__.py
new file mode 100644
index 00000000..5d71a5c4
--- /dev/null
+++ b/faker/providers/date_time/pl_PL/__init__.py
@@ -0,0 +1,41 @@
+# coding: utf-8
+
+from __future__ import unicode_literals
+
+from .. import Provider as DateTimeProvider
+
+
+class Provider(DateTimeProvider):
+
+    @classmethod
+    def day_of_week(cls):
+        day = cls.date('%w')
+        DAY_NAMES = {
+            '0': 'poniedziałek',
+            '1': 'wtorek',
+            '2': 'środa',
+            '3': 'czwartek',
+            '4': 'piątek',
+            '5': 'sobota',
+            '6': 'niedziela',
+        }
+        return DAY_NAMES[day]
+
+    @classmethod
+    def month_name(cls):
+        month = cls.month()
+        MONTH_NAMES = {
+            '01': 'styczeń',
+            '02': 'luty',
+            '03': 'marzec',
+            '04': 'kwiecień',
+            '05': 'maj',
+            '06': 'czerwiec',
+            '07': 'lipiec',
+            '08': 'sierpień',
+            '09': 'wrzesień',
+            '10': 'październik',
+            '11': 'listopad',
+            '12': 'grudzień'
+        }
+        return MONTH_NAMES[month]


Test patch:
diff --git a/tests/providers/date_time.py b/tests/providers/date_time.py
index 99e02ea4..c4910c2d 100644
--- a/tests/providers/date_time.py
+++ b/tests/providers/date_time.py
@@ -6,6 +6,7 @@ import unittest
 from faker import Factory
 from .. import string_types
 
+
 class TestHuHU(unittest.TestCase):
     """ Tests date_time in hu_HU locale. """
 
@@ -20,3 +21,41 @@ class TestHuHU(unittest.TestCase):
         month = self.factory.month()
         assert isinstance(month, string_types)
 
+
+class TestPlPL(unittest.TestCase):
+
+    DAY_NAMES = (
+        'poniedziałek',
+        'wtorek',
+        'środa',
+        'czwartek',
+        'piątek',
+        'sobota',
+        'niedziela',
+    )
+
+    MONTH_NAMES = (
+        'styczeń',
+        'luty',
+        'marzec',
+        'kwiecień',
+        'maj',
+        'czerwiec',
+        'lipiec',
+        'sierpień',
+        'wrzesień',
+        'październik',
+        'listopad',
+        'grudzień'
+    )
+
+    def setUp(self):
+        self.factory = Factory.create('pl_PL')
+
+    def test_day(self):
+        day = self.factory.day_of_week()
+        assert day in self.DAY_NAMES
+
+    def test_month(self):
+        month = self.factory.month_name()
+        assert month in self.MONTH_NAMES