(.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py populate_source 0
CommandError: Alleen hele getallen > 0 toegestaan
(.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py populate_source 1
Teksten zijn gegenereerd voor tekstlengte 1
(.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py populate_source 1
CommandError: Teksten voor nummer 1 zijn al eerder gegenereerd
(.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py populate_source 7
CommandError: Opgegeven sleutel 7 niet gevonden
(.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py test tests.test_sources_app_command_populate
Found 3 test(s).
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
EEE
======================================================================
ERROR: test_command_output_been_there (tests.test_sources_app_command_populate.PopulateSourceTests.test_command_output_been_there)
Test for failure: in_use = True.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
return super().execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.IntegrityError: NOT NULL constraint failed: domain_sources_app_characternumber.number_of_combinations
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/werker/Projects/domain_reader/tests/test_sources_app_command_populate.py", line 30, in test_command_output_been_there
thingy.save()
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", line 814, in save
self.save_base(
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", line 877, in save_base
updated = self._save_table(
^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", line 1020, in _save_table
results = self._do_insert(
^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", line 1061, in _do_insert
return manager._insert(
^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/query.py", line 1805, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1820, in execute_sql
cursor.execute(sql, params)
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
return super().execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.IntegrityError: NOT NULL constraint failed: domain_sources_app_characternumber.number_of_combinations
======================================================================
ERROR: test_command_output_small (tests.test_sources_app_command_populate.PopulateSourceTests.test_command_output_small)
Test for failure with value '0'.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/werker/Projects/domain_reader/tests/test_sources_app_command_populate.py", line 20, in test_command_output_small
call_command("populate_source", 0, stdout=out)
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 194, in call_command
return command.execute(*args, **defaults)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/domain_sources_app/management/commands/populate_source.py", line 36, in handle
raise CommandError('Alleen hele getallen > 0 toegestaan')
django.core.management.base.CommandError: Alleen hele getallen > 0 toegestaan
======================================================================
ERROR: test_command_output_success (tests.test_sources_app_command_populate.PopulateSourceTests.test_command_output_success)
Test for success: in_use = False.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
return super().execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.IntegrityError: NOT NULL constraint failed: domain_sources_app_characternumber.number_of_combinations
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/werker/Projects/domain_reader/tests/test_sources_app_command_populate.py", line 48, in test_command_output_success
thingy.save()
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", line 814, in save
self.save_base(
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", line 877, in save_base
updated = self._save_table(
^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", line 1020, in _save_table
results = self._do_insert(
^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", line 1061, in _do_insert
return manager._insert(
^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/query.py", line 1805, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1820, in execute_sql
cursor.execute(sql, params)
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
return super().execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.IntegrityError: NOT NULL constraint failed: domain_sources_app_characternumber.number_of_combinations
----------------------------------------------------------------------
Ran 3 tests in 0.008s
FAILED (errors=3)
Destroying test database for alias 'default'...
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1d0ce155-35e7-4049-88d4-80124c83dedcn%40googlegroups.com.
No comments:
Post a Comment