Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures #17

Open
matoro opened this issue Jan 17, 2019 · 0 comments
Open

Test failures #17

matoro opened this issue Jan 17, 2019 · 0 comments

Comments

@matoro
Copy link

matoro commented Jan 17, 2019

After silencing the system check error for the deprecated CommaSeparatedIntegerField (https://code.kodo.org.uk/dom/django/commit/dca8b916ffa391964be26bbd62471d4c11b221fd), the test suite fails with four errors. The first is caused by test-image.png not getting included in the package directory, but I'm not sure about the cause of the other three:

.E.......EE................E......................
======================================================================
ERROR: test_image_from_directory (tests.tests.TestImageHelpers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/django-sampledatahelper-0.4.1/work/django-sampledatahelper-0.4.1-python3_6/tests/tests.py", line 504, in test_image_from_directory                                                                                                                                                  
    value = self.sd.image_from_directory(os.path.dirname(__file__))
  File "/var/tmp/portage/dev-python/django-sampledatahelper-0.4.1/work/django-sampledatahelper-0.4.1-python3_6/sampledatahelper/helper.py", line 56, in image_from_directory                                                                                                                                            
    random_path = self.image_path_from_directory(directory_path, valid_extensions)
  File "/usr/lib/python3.6/site-packages/sampledata/mixins/image_mixin.py", line 23, in image_path_from_directory
    raise NotChoicesFound('Not valid images found in directory_path for valid_extensions')
sampledata.exceptions.NotChoicesFound: Not valid images found in directory_path for valid_extensions

======================================================================
ERROR: test_fill_model (tests.tests.TestModelDataHelpers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/django-sampledatahelper-0.4.1/work/django-sampledatahelper-0.4.1-python3_6/tests/tests.py", line 691, in test_fill_model
    self.mdh.fill_model(models.TestModel, 5)
  File "/var/tmp/portage/dev-python/django-sampledatahelper-0.4.1/work/django-sampledatahelper-0.4.1-python3_6/sampledatahelper/model_helper.py", line 59, in fill_model                                                                                                                                                
    self.fill_model_instance(instance, *args, **kwargs)
  File "/var/tmp/portage/dev-python/django-sampledatahelper-0.4.1/work/django-sampledatahelper-0.4.1-python3_6/sampledatahelper/model_helper.py", line 70, in fill_model_instance                                                                                                                                       
    value = handler.generate()
  File "/var/tmp/portage/dev-python/django-sampledatahelper-0.4.1/work/django-sampledatahelper-0.4.1-python3_6/sampledatahelper/handlers.py", line 10, in generate                                                                                                                                                      
    return self._generate()
  File "/var/tmp/portage/dev-python/django-sampledatahelper-0.4.1/work/django-sampledatahelper-0.4.1-python3_6/sampledatahelper/handlers.py", line 153, in _generate                                                                                                                                                    
    if self.instance.rel.limit_choices_to:
AttributeError: 'ForeignKey' object has no attribute 'rel'

======================================================================
ERROR: test_fill_model_instance (tests.tests.TestModelDataHelpers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/django-sampledatahelper-0.4.1/work/django-sampledatahelper-0.4.1-python3_6/tests/tests.py", line 679, in test_fill_model_instance                                                                                                                                                   
    self.mdh.fill_model_instance(instance)
  File "/var/tmp/portage/dev-python/django-sampledatahelper-0.4.1/work/django-sampledatahelper-0.4.1-python3_6/sampledatahelper/model_helper.py", line 70, in fill_model_instance                                                                                                                                       
    value = handler.generate()
  File "/var/tmp/portage/dev-python/django-sampledatahelper-0.4.1/work/django-sampledatahelper-0.4.1-python3_6/sampledatahelper/handlers.py", line 10, in generate                                                                                                                                                      
    return self._generate()
  File "/var/tmp/portage/dev-python/django-sampledatahelper-0.4.1/work/django-sampledatahelper-0.4.1-python3_6/sampledatahelper/handlers.py", line 153, in _generate                                                                                                                                                    
    if self.instance.rel.limit_choices_to:
AttributeError: 'ForeignKey' object has no attribute 'rel'

======================================================================
ERROR: test_calling_command (tests.tests.TestSampleDataHelperCommand)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/django-sampledatahelper-0.4.1/work/django-sampledatahelper-0.4.1-python3_6/tests/tests.py", line 743, in test_calling_command                                                                                                                                                       
    call_command('sampledatafiller', interactive=False)
  File "/usr/lib/python3.6/site-packages/django/core/management/__init__.py", line 140, in call_command
    ', '.join(sorted(valid_options)),
TypeError: Unknown option(s) for sampledatafiller command: interactive. Valid options are: help, no_color, pythonpath, settings, skip_checks, stderr, stdout, traceback, verbosity, version.                                                                                                                            

----------------------------------------------------------------------
Ran 50 tests in 11.796s


FAILED (errors=4)                                                                                     
Operations to perform:                                                                                                                                                                                                                                                                                                  
  Synchronize unmigrated apps: sampledatahelper, tests
  Apply all migrations: auth, contenttypes, sessions                                                                                                                                                                                                                                                                    
Synchronizing apps without migrations:    
  Creating tables...                                                               
    Creating table tests_testrelatedmodel
    Creating table tests_testmodel                                                                                
    Running deferred SQL...                                                                                      
Running migrations:                                                                                                
  Applying contenttypes.0001_initial... OK                                                                                
  Applying contenttypes.0002_remove_content_type_name... OK                                                                                                                                                                                                                                                             
  Applying auth.0001_initial... OK                                                                  
  Applying auth.0002_alter_permission_name_max_length... OK                                                                                                                                                                                                                                                             
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK                                                                                                                                                                                                                                                                     
  Applying auth.0005_alter_user_last_login_null... OK                                                              
  Applying auth.0006_require_contenttypes_0002... OK                                                                                                                                                                                                                                                                    
  Applying auth.0007_alter_validators_add_error_messages... OK     
  Applying auth.0008_alter_user_username_max_length... OK 
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying sessions.0001_initial... OK                                
Creating test database for alias 'default'...                        
System check identified no issues (1 silenced).                       
Destroying test database for alias 'default'...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant