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
Commits
bb59a409
Commit
bb59a409
authored
7 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
test of apopintment title with visit
parent
00e3f22c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!99
separate patient data from study data
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
smash/web/models/appointment.py
+1
-1
1 addition, 1 deletion
smash/web/models/appointment.py
smash/web/tests/models/test_appointment.py
+8
-0
8 additions, 0 deletions
smash/web/tests/models/test_appointment.py
with
9 additions
and
1 deletion
smash/web/models/appointment.py
+
1
−
1
View file @
bb59a409
...
@@ -125,7 +125,7 @@ class Appointment(models.Model):
...
@@ -125,7 +125,7 @@ class Appointment(models.Model):
title
=
"
N/A
"
title
=
"
N/A
"
return
title
return
title
else
:
else
:
title
=
self
.
visit
.
subject
.
first_name
+
"
"
+
self
.
visit
.
subject
.
last_name
+
"
type:
"
title
=
self
.
visit
.
subject
.
subject
.
first_name
+
"
"
+
self
.
visit
.
subject
.
subject
.
last_name
+
"
type:
"
for
appointment_type
in
self
.
appointment_types
.
all
():
for
appointment_type
in
self
.
appointment_types
.
all
():
title
+=
appointment_type
.
code
+
"
,
"
title
+=
appointment_type
.
code
+
"
,
"
return
title
return
title
This diff is collapsed.
Click to expand it.
smash/web/tests/models/test_appointment.py
+
8
−
0
View file @
bb59a409
import
logging
from
django.test
import
TestCase
from
django.test
import
TestCase
from
web.tests.functions
import
create_appointment
from
web.tests.functions
import
create_appointment
logger
=
logging
.
getLogger
(
__name__
)
class
AppointmentModelTests
(
TestCase
):
class
AppointmentModelTests
(
TestCase
):
def
test_title_for_appointment_without_visit
(
self
):
def
test_title_for_appointment_without_visit
(
self
):
...
@@ -12,3 +16,7 @@ class AppointmentModelTests(TestCase):
...
@@ -12,3 +16,7 @@ class AppointmentModelTests(TestCase):
appointment
.
save
()
appointment
.
save
()
self
.
assertEqual
(
comment
,
appointment
.
title
())
self
.
assertEqual
(
comment
,
appointment
.
title
())
def
test_title_for_appointment_with_visit
(
self
):
appointment
=
create_appointment
()
self
.
assertIsNotNone
(
appointment
.
title
())
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