class RandomNameProviderTest(unittest.TestCase): """Test class for RandomWordProvider. """ def setUp(self): self.provider = RandomNameProvider() def testGetValue(self): """Tests getValue(). """ value = self.provider.getValue() self.assertTrue(name in self.provider.choices for name in value.split())
def getValue(self): name = RandomNameProvider.getValue(self) return '.'.join(name.split()).lower() + '@' + self.getRandomDomain()
def setUp(self): self.provider = RandomNameProvider()