def test_generate_no_tribes(self):
   names_array = names.generate('tribe', 'en_us', 0)
   self.assertFalse((names_array is not False) and (len(names_array) == 0))
 def test_generate_tribes(self):
   amount = random.randint(1, 10)
   names_array = names.generate('tribe', 'en_us', amount)
   self.assertTrue((names_array is not False) and (len(names_array) == amount))
Beispiel #3
0
def get_tribe_name(request):
  tribe_names = names.generate('tribe', 'en_us', 1)
  return render(request, 'stoneball/get_tribe_names.html', {'tribe_names': tribe_names})