def test_random_pystr_characters(self): from faker.providers.python import Provider provider = Provider(self.generator) characters = provider.pystr() assert len(characters) == 20 characters = provider.pystr(max_chars=255) assert len(characters) == 255 characters = provider.pystr(max_chars=0) assert characters == '' characters = provider.pystr(max_chars=-10) assert characters == '' characters = provider.pystr(min_chars=10, max_chars=255) assert (len(characters) >= 10)
def test_random_pystr_characters(self): from faker.providers.python import Provider provider = Provider(self.generator) characters = provider.pystr() self.assertEqual(len(characters), 20) characters = provider.pystr(max_chars=255) self.assertEqual(len(characters), 255) characters = provider.pystr(max_chars=0) 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_random_pystr_characters(self): from faker.providers.python import Provider provider = Provider(self.generator) characters = provider.pystr() self.assertEqual(len(characters), 20) characters = provider.pystr(max_chars=255) self.assertEqual(len(characters), 255) characters = provider.pystr(max_chars=0) 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_random_pystr_characters(self): from faker.providers.python import Provider provider = Provider(self.generator) characters = provider.pystr() assert len(characters) == 20 characters = provider.pystr(max_chars=255) assert len(characters) == 255 characters = provider.pystr(max_chars=0) assert characters == '' characters = provider.pystr(max_chars=-10) assert characters == '' characters = provider.pystr(min_chars=10, max_chars=255) assert (len(characters) >= 10)