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

Refactor Unit Tests to test new sort ordering structure. #96

Closed
avelis opened this issue Jan 19, 2016 · 1 comment · Fixed by #97
Closed

Refactor Unit Tests to test new sort ordering structure. #96

avelis opened this issue Jan 19, 2016 · 1 comment · Fixed by #97

Comments

@avelis
Copy link
Collaborator

avelis commented Jan 19, 2016

The following unit tests fail under the new feature #95
Will have to reteach the unit tests to assert the correct behavior. While this should have been done before it was merged into master. I am actively taking contributions in order to help resolve the growing list issues for this library.

======================================================================
ERROR: test_default (tests.test_view_requests.TestContext)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "django-silk/project/tests/test_view_requests.py", line 33, in test_default
    'order_by': RequestsView.defualt_order_by,
AttributeError: type object 'RequestsView' has no attribute 'defualt_order_by'

======================================================================
ERROR: test_get (tests.test_view_requests.TestContext)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "django-silk/project/tests/test_view_requests.py", line 50, in test_get
    context = RequestsView()._create_context(request)
  File "/Users/andrewvelis/Documents/django-silk/project/silk/views/requests.py", line 106, in _create_context
    filters=[BaseFilter.from_dict(x) for _, x in raw_filters.items()])
  File "/Users/andrewvelis/Documents/django-silk/project/silk/views/requests.py", line 70, in _get_objects
    raise RuntimeError('Unknown order_by: "%s"' % order_by)
RuntimeError: Unknown order_by: "Path"

======================================================================
ERROR: test_time_spent_db_with_path (tests.test_view_requests.TestGetObjects)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "django-silk/project/tests/test_view_requests.py", line 94, in test_time_spent_db_with_path
    path=request.path)
  File "/Users/andrewvelis/Documents/django-silk/project/silk/views/requests.py", line 70, in _get_objects
    raise RuntimeError('Unknown order_by: "%s"' % order_by)
RuntimeError: Unknown order_by: "Time on queries"

======================================================================
ERROR: test_ordering (tests.test_view_requests.TestOrderingRequestView)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "django-silk/project/tests/test_view_requests.py", line 111, in test_ordering
    self.assertSorted(objects=RequestsView()._get_objects(order_by='Recent'),
  File "django-silk/project/silk/views/requests.py", line 70, in _get_objects
    raise RuntimeError('Unknown order_by: "%s"' % order_by)
RuntimeError: Unknown order_by: "Recent"

======================================================================
ERROR: test_order_by (tests.test_view_requests.TestRootViewDefaults)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "django-silk/project/tests/test_view_requests.py", line 22, in test_order_by
    self.assertIn(RequestsView.defualt_order_by, RequestsView.order_by)
AttributeError: type object 'RequestsView' has no attribute 'defualt_order_by'
@avelis avelis changed the title Refactor Unit Tests that test ordering structure. Refactor Unit Tests to test new sort ordering structure. Jan 19, 2016
@avelis
Copy link
Collaborator Author

avelis commented Jan 19, 2016

@trik This was my bad for not having better diligence in running the unit test suite before merging the pull request. I am looking in the near term to re-enable TravisCI to help everyone know when tests are failing.

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

Successfully merging a pull request may close this issue.

1 participant