diff --git a/.travis/mysql_settings.py b/.travis/mysql_settings.py index 1ee080a989..c4ec79d0e6 100644 --- a/.travis/mysql_settings.py +++ b/.travis/mysql_settings.py @@ -47,14 +47,14 @@ DATABASES = { 'HOST': 'localhost', 'PORT': '', # use default port 'OPTIONS': { - # 'read_default_file': '.travis/my.conf', - 'charset': 'utf8mb4' + 'charset': 'utf8mb4', + 'init_command': 'set collation_connection=utf8mb4_unicode_ci' }, 'TEST': { 'NAME': 'default', 'OPTIONS': { - # 'read_default_file': '.travis/my.conf' - 'charset': 'utf8mb4' + 'charset': 'utf8mb4', + 'init_command': 'set collation_connection=utf8mb4_unicode_ci' } } } diff --git a/evennia/server/tests/test_server.py b/evennia/server/tests/test_server.py index 89896b9157..bc971af7a4 100644 --- a/evennia/server/tests/test_server.py +++ b/evennia/server/tests/test_server.py @@ -9,14 +9,6 @@ from django.test import override_settings from evennia.utils.test_resources import unload_module -class TestDatabase(TestCase): - def test_database(self): - - import subprocess - # subprocess.call(["mysql", "-u", "root", '-e "SHOW TABLE STATUS;"', "evennia"], shell=True) - subprocess.call("mysql -u root -e \"SHOW TABLE STATUS;\" evennia", shell=True) - - @patch("evennia.server.server.LoopingCall", new=MagicMock()) class TestServer(TestCase): """ diff --git a/evennia/server/validators.py b/evennia/server/validators.py index f58b44e6eb..faa1aa68c8 100644 --- a/evennia/server/validators.py +++ b/evennia/server/validators.py @@ -31,9 +31,7 @@ class EvenniaUsernameAvailabilityValidator: ) # Check database - exists = AccountDB.objects.filter(username__iexact=username) - print("\nusernamevalidator query: {}".format(exists.query)) - exists = exists.exists() + exists = AccountDB.objects.filter(username__iexact=username).exists() if exists: raise ValidationError( _('Sorry, that username is already taken.'),