Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
SMASCH
scheduling-system
Merge requests
!31
Tests added
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Tests added
tests
into
master
Overview
0
Commits
19
Pipelines
1
Changes
1
Merged
Piotr Gawron
requested to merge
tests
into
master
8 years ago
Overview
0
Commits
19
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Viewing commit
5afc98ea
Prev
Next
Show latest version
1 file
+
17
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
5afc98ea
additional test for get_visits_with_missing_appointments_count
· 5afc98ea
Piotr Gawron
authored
8 years ago
smash/web/tests/test_view_notifications.py
+
17
−
1
Options
@@ -21,7 +21,7 @@ from web.views.notifications import \
get_today_midnight_date
,
\
get_unfinished_appointments
,
\
get_unfinished_appointments_count
,
\
get_unfinished_visits
get_unfinished_visits
,
get_active_visits_with_missing_appointments
class
NotificationViewTests
(
TestCase
):
@@ -75,6 +75,22 @@ class NotificationViewTests(TestCase):
notification
=
get_visits_with_missing_appointments_count
(
self
.
user
)
self
.
assertEquals
(
original_notification
.
count
+
1
,
notification
.
count
)
def
test_get_visits_with_missing_appointments_count_2
(
self
):
original_notification
=
get_visits_with_missing_appointments_count
(
self
.
user
)
appointment_type
=
create_appointment_type
()
visit
=
create_visit
()
visit
.
appointment_types
.
add
(
appointment_type
)
visit
.
save
()
appointment
=
create_appointment
(
visit
)
appointment
.
appointment_types
.
add
(
appointment_type
)
appointment
.
status
=
Appointment
.
APPOINTMENT_STATUS_FINISHED
appointment
.
save
()
notification
=
get_visits_with_missing_appointments_count
(
self
.
user
)
self
.
assertEquals
(
original_notification
.
count
,
notification
.
count
)
def
test_get_notifications
(
self
):
create_worker
(
self
.
user
)
result
=
get_notifications
(
self
.
user
)
Loading