This repository has been archived on 2025-11-04. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
csmb-housewars/housewars/tests/utils/test_get_random_string.py

15 lines
476 B
Python

from django.test import TestCase
from housewars.utils import get_random_string
class GetRandomStringTest(TestCase):
def test_string_of_length_8(self):
"""The string generated is of the correct length"""
string = get_random_string(8)
self.assertEqual(len(string), 8)
def test_string_of_length_6(self):
"""The string generated is of the correct length"""
string = get_random_string(6)
self.assertEqual(len(string), 6)