def test_fails_if_no_innodb_strict(self):
     errors = check_variables(app_configs=None,
                              databases=["default", "other"])
     assert len(errors) == 1
     assert errors[0].id == "django_mysql.W002"
     assert "InnoDB Strict Mode" in errors[0].msg
 def test_fails_if_not_utf8mb4(self):
     errors = check_variables(app_configs=None,
                              databases=["default", "other"])
     assert len(errors) == 1
     assert errors[0].id == "django_mysql.W003"
     assert "utf8mb4" in errors[0].msg
 def test_passes_databases_none(self):
     errors = check_variables(app_configs=None, databases=None)
     assert errors == []
 def test_passes_databases_other(self):
     errors = check_variables(app_configs=None, databases=["other"])
     assert errors == []
Exemple #5
0
 def test_fails_if_not_utf8mb4(self):
     errors = check_variables([])
     assert len(errors) == 1
     assert errors[0].id == "django_mysql.W003"
     assert "utf8mb4" in errors[0].msg
 def test_passes(self):
     assert check_variables(app_configs=None,
                            databases=["default", "other"]) == []
Exemple #7
0
 def test_passes(self):
     assert check_variables([]) == []
Exemple #8
0
 def test_fails_if_no_innodb_strict(self):
     errors = check_variables([])
     assert len(errors) == 1
     assert errors[0].id == "django_mysql.W002"
     assert "InnoDB Strict Mode" in errors[0].msg
 def test_fails_if_not_utf8mb4(self):
     errors = check_variables([])
     assert len(errors) == 1
     assert errors[0].id == 'django_mysql.W003'
     assert "utf8mb4" in errors[0].msg
Exemple #10
0
 def test_fails_if_no_strict(self):
     errors = check_variables([])
     assert len(errors) == 1
     assert errors[0].id == 'django_mysql.W001'
     assert "MySQL Strict Mode" in errors[0].msg
 def test_fails_if_no_innodb_strict(self):
     errors = check_variables([])
     assert len(errors) == 1
     assert errors[0].id == 'django_mysql.W002'
     assert "InnoDB Strict Mode" in errors[0].msg
 def test_passes(self):
     assert check_variables([]) == []
 def test_fails_if_not_utf8mb4_old_django(self):
     errors = check_variables(app_configs=None)
     assert len(errors) == 1
     assert errors[0].id == "django_mysql.W003"
     assert "utf8mb4" in errors[0].msg
 def test_fails_if_no_innodb_strict_old_django(self):
     errors = check_variables(app_configs=None)
     assert len(errors) == 1
     assert errors[0].id == "django_mysql.W002"
     assert "InnoDB Strict Mode" in errors[0].msg
 def test_passes_old_django(self):
     assert check_variables(app_configs=None) == []