Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add couple of tests for compat module#4845

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@archy-rock3t-cloud
Copy link
Contributor

No description provided.

@lovelydinosaurlovelydinosaur merged commit9c8adb4 intoencode:masterJan 24, 2017
seconds = 1
microseconds = 100
timedelta = MockTimedelta()
expected = (timedelta.days * 86400.0) + float(timedelta.seconds) + (timedelta.microseconds / 1000000.0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is there any reason why we chose to calculate the expected value in the test instead of working from a known-good value for how many seconds there are?

compat.django.VERSION = (1, 10)
assert compat.get_remote_field(MockField(), default='default_value') == 'example_remote_field'
assert compat.get_remote_field(object(), default='default_value') == 'default_value'
compat.django.VERSION = original_django_version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This won't reset the Django version if this test fails, because anAssertionError will be raised before it gets to this point.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Good point - lazy review on my part.

@archy-rock3t-cloudarchy-rock3t-cloud deleted the compat-tests branchJanuary 25, 2017 09:53
vpistis added a commit to vpistis/django-rest-framework that referenced this pull requestFeb 6, 2017
* master: (95 commits)  Add max_length and min_length arguments for ListField (encode#4877)  Update sponsors on README to include rollbar (encode#4876)  Added Rollbar to premium sponsors  fixed url checker ':' to 'http' (encode#4678)  Fixed `dedent` for tab indent.  Add test for pagination when limit not set  Fixed Django 2.0 compatibility due to `django.conf.urls.include` parameters change. (encode#4866)  Add remaining tests for generics (encode#4865)  Removed unnecessary importlib wrapper.  Updated Support section and added funding email (encode#4860)  Git add remaining tests for BaseSerializer (encode#4857)  Update machinalis links  Updated Machinalis links (encode#4856)  Add remaining tests for metadata (encode#4855)Fixedencode#4574 -- Removed multi-table inheritance auto created PK from serialize. (encode#4852)  Add couple of tests for filters (encode#4849)  Refactor according to comments in PR (encode#4848)  Add couple of tests for compat module (encode#4845)  Direct readers to info on how to add viewset docs (encode#4844)  Fixed test_one_to_one_with_inheritance. Added required on_delete attribute to OneToOneField field. (encode#4838)  ...
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@lovelydinosaurlovelydinosaurlovelydinosaur approved these changes

+1 more reviewer

@kevin-brownkevin-brownkevin-brown left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@archy-rock3t-cloud@lovelydinosaur@kevin-brown

[8]ページ先頭

©2009-2025 Movatter.jp