Repository: joke2k/faker

Issue:
NameError: name 'args' is not defined
I'm getting an error using the *args method.

```
fake.email(*args, **kwargs)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'args' is not defined

```
Also can I change the **kwargs with @gmail to get random@gmail.com?



Discussion:

Patch:
diff --git a/faker/providers/internet/__init__.py b/faker/providers/internet/__init__.py
index acdda088..f357f2c7 100644
--- a/faker/providers/internet/__init__.py
+++ b/faker/providers/internet/__init__.py
@@ -75,9 +75,13 @@ class Provider(BaseProvider):
         return string
 
     @lowercase
-    def email(self):
-        pattern = self.random_element(self.email_formats)
-        return "".join(self.generator.parse(pattern).split(" "))
+    def email(self, domain=None):
+        if domain:
+            email = '{0}@{1}'.format(self.user_name(), domain)
+        else:
+            pattern = self.random_element(self.email_formats)
+            email = "".join(self.generator.parse(pattern).split(" "))
+        return email
 
     @lowercase
     def safe_email(self):


Test patch:
diff --git a/tests/providers/test_internet.py b/tests/providers/test_internet.py
index 555e7975..fe444b5b 100644
--- a/tests/providers/test_internet.py
+++ b/tests/providers/test_internet.py
@@ -14,6 +14,17 @@ from faker.utils import text
 from tests import string_types
 
 
+class TestInternetProvider(unittest.TestCase):
+    """ Tests internet """
+
+    def setUp(self):
+        self.factory = Faker()
+
+    def test_email(self):
+        email = self.factory.email(domain='example.com')
+        self.assertEqual(email.split('@')[1], 'example.com')
+
+
 class TestJaJP(unittest.TestCase):
     """ Tests internet in the ja_JP locale """