Repository: joke2k/faker

Issue:
When attempting to generate a Finnish ssn of a specific age the provider crashes
* Faker version: 19.11.0
* OS: Windows 10

When attempting to generate a Finnish ssn of a certain age the provider crashes because ``datetime.timedelta(days=self.generator.random.randrange(min_age * 365, max_age * 365))`` is always trying to generate a time within range. The ssn provider should handle situations where min_age and max_age are the same.
For example:
```
if min_age == max_age:
    age = datetime.timedelta(days=min_age * 365)
else:
    age = datetime.timedelta(days=self.generator.random.randrange(min_age * 365, max_age * 365))
```

### Steps to reproduce

1. Create a faker with fi_FI locale: ``fake = Faker('fi_FI')``
2. Call the ssn provider with the same minimum and maximum age: ``fake.ssn(min_age=50, max_age=50, artificial=True)``

### Expected behavior

The faker generates an artificial Finnish ssn that is 50 years old. 

### Actual behavior

``ValueError: empty range for randrange() (18250, 18250, 0)``


Discussion:

Patch:
diff --git a/faker/providers/geo/__init__.py b/faker/providers/geo/__init__.py
index 377ef7d0..0ccbbdc8 100644
--- a/faker/providers/geo/__init__.py
+++ b/faker/providers/geo/__init__.py
@@ -199,6 +199,18 @@ class Provider(BaseProvider):
         ("23.0072", "-82.4017", "Boyeros", "CU", "America/Havana"),
         ("50.50301", "13.63617", "Most", "CZ", "Europe/Prague"),
         ("50.23271", "12.87117", "Karlovy Vary", "CZ", "Europe/Prague"),
+        ("50.073658", "14.418540", "Praha", "CZ", "Europe/Prague"),
+        ("49.144482", "15.006139", "Jindřichův Hradec", "CZ", "Europe/Prague"),
+        ("48.975658", "14.480255", "České Budějovice", "CZ", "Europe/Prague"),
+        ("50.511002", "14.150558", "Terezín", "CZ", "Europe/Prague"),
+        ("49.183239", "15.454273", "Telč", "CZ", "Europe/Prague"),
+        ("49.952431", "15.268654", "Kutná Hora", "CZ", "Europe/Prague"),
+        ("49.593777", "17.250879", "Olomouc", "CZ", "Europe/Prague"),
+        ("49.738430", "13.373637", "Plzeň", "CZ", "Europe/Prague"),
+        ("48.812737", "14.317466", "Český Krumlov", "CZ", "Europe/Prague"),
+        ("49.195061", "16.606836", "Brno", "CZ", "Europe/Prague"),
+        ("50.598427", "13.610242", "Litvínov", "CZ", "Europe/Prague"),
+        ("49.820923", "18.262524", "Ostrava", "CZ", "Europe/Prague"),
         ("51.04962", "12.1369", "Zeitz", "DE", "Europe/Berlin"),
         ("52.59319", "13.32127", "Wittenau", "DE", "Europe/Berlin"),
         ("50.82709", "6.9747", "Wesseling", "DE", "Europe/Berlin"),
diff --git a/faker/providers/ssn/fi_FI/__init__.py b/faker/providers/ssn/fi_FI/__init__.py
index 8e8bba6c..016782c0 100644
--- a/faker/providers/ssn/fi_FI/__init__.py
+++ b/faker/providers/ssn/fi_FI/__init__.py
@@ -26,7 +26,10 @@ class Provider(SsnProvider):
             checksum_characters = "0123456789ABCDEFHJKLMNPRSTUVWXY"
             return checksum_characters[int(hetu) % 31]
 
-        age = datetime.timedelta(days=self.generator.random.randrange(min_age * 365, max_age * 365))
+        if min_age == max_age:
+            age = datetime.timedelta(days=min_age * 365)
+        else:
+            age = datetime.timedelta(days=self.generator.random.randrange(min_age * 365, max_age * 365))
         birthday = datetime.date.today() - age
         hetu_date = "%02d%02d%s" % (
             birthday.day,


Test patch:
diff --git a/tests/providers/test_ssn.py b/tests/providers/test_ssn.py
index 6765f54c..0672c086 100644
--- a/tests/providers/test_ssn.py
+++ b/tests/providers/test_ssn.py
@@ -793,6 +793,18 @@ class TestFiFI(unittest.TestCase):
         for _ in range(100):
             assert re.search(r"^FI\d{8}$", self.fake.vat_id())
 
+    def test_ssn_without_age_range(self):
+        current_year = datetime.now().year
+        age = current_year - 1995
+        ssn = self.fake.ssn(min_age=age, max_age=age, artificial=True)
+        assert "95-" in ssn
+        age = current_year - 2013
+        ssn = self.fake.ssn(min_age=age, max_age=age, artificial=True)
+        assert "13A" in ssn
+        age = current_year - 1898
+        ssn = self.fake.ssn(min_age=age, max_age=age, artificial=True)
+        assert "98+" in ssn
+
 
 class TestFrFR(unittest.TestCase):
     def setUp(self):