Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
internewshid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aptivate
client-projects
internewshid
Commits
46a5d1dc
Commit
46a5d1dc
authored
9 years ago
by
Martin Burchell
Browse files
Options
Downloads
Patches
Plain Diff
WIP made test also include too recent item
parent
5d9775b1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
django/website/rest_api/tests/term_itemcount_tests.py
+13
-8
13 additions, 8 deletions
django/website/rest_api/tests/term_itemcount_tests.py
with
13 additions
and
8 deletions
django/website/rest_api/tests/term_itemcount_tests.py
+
13
−
8
View file @
46a5d1dc
...
...
@@ -135,24 +135,29 @@ def test_items_in_date_range_returned(questions_category_slug):
one_week_ago
=
now
-
timedelta
(
weeks
=
1
)
eight_days_ago
=
now
-
timedelta
(
days
=
8
)
origin1
=
create_item
(
body
=
"
Wh
at was the caused of ebola outbreak in liberia
?
"
,
item_too_recent
=
create_item
(
body
=
"
Wh
ere did ebola came from
?
"
,
timestamp
=
now
).
data
origin2
=
create_item
(
body
=
"
Is Ebola a man made sickness
"
,
item_in_range_1
=
create_item
(
body
=
"
What was the caused of ebola outbreak in liberia?
"
,
timestamp
=
one_day_ago
).
data
origin3
=
create_item
(
item_in_range_2
=
create_item
(
body
=
"
Is Ebola a man made sickness
"
,
timestamp
=
one_week_ago
).
data
item_too_old
=
create_item
(
body
=
"
What brought about ebola in liberia
"
,
timestamp
=
eight_days_ago
).
data
origins
=
add_term
(
taxonomy
=
questions_category_slug
,
name
=
"
Test Origins
"
).
data
categorize_item
(
origin1
,
origins
)
categorize_item
(
origin2
,
origins
)
categorize_item
(
origin3
,
origins
)
categorize_item
(
item_in_range_1
,
origins
)
categorize_item
(
item_in_range_2
,
origins
)
categorize_item
(
item_too_old
,
origins
)
categorize_item
(
item_too_recent
,
origins
)
get_params
=
{
'
start_time
'
:
one_week_ago
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment