Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9298448a
authored
Jun 04, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix tests
parent
e6764922
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
circle/dashboard/templates/base.html
+1
-1
circle/dashboard/templates/dashboard/_display-name.html
+12
-10
circle/dashboard/tests/test_mockedviews.py
+1
-0
No files found.
circle/dashboard/templates/base.html
View file @
9298448a
...
...
@@ -47,7 +47,7 @@
</ul>
</li>
</ul>
{% if user.is_authenticated %}
{% if user.is_authenticated
and user.pk
%}
<a
class=
"navbar-brand pull-right"
href=
"{% url "
logout
"
%}?
next=
{%
url
"
login
"
%}"
style=
"color: white; font-size: 10px;"
><i
class=
"icon-signout icon-sign-out"
></i>
{% trans "Log out" %}
</a>
<a
class=
"navbar-brand pull-right"
href=
"{% url "
dashboard
.
views
.
profile
"
pk=
user.pk
%}"
title=
"{% trans "
User
profile
"
%}"
style=
"color: white; font-size: 10px;"
><i
class=
"icon-user "
></i>
{{user}}
</a>
{% if user.is_superuser %}
...
...
circle/dashboard/templates/dashboard/_display-name.html
View file @
9298448a
{% load i18n %}
{% if user.get_full_name %}
{{ user.get_full_name }}
{% else %}
{{ user.username }}
{% endif %}
{% if show_org %}
{% if user.profile and user.profile.org_id %}
({{ user.profile.org_id }})
{% if user and user.pk %}
{% if user.get_full_name %}
{{ user.get_full_name }}
{% else %}
({% trans "username" %}: {{ user.username }})
{{ user.username }}
{% endif %}
{% if show_org %}
{% if user.profile and user.profile.org_id %}
({{ user.profile.org_id }})
{% else %}
({% trans "username" %}: {{ user.username }})
{% endif %}
{% endif %}
{% endif %}
circle/dashboard/tests/test_mockedviews.py
View file @
9298448a
...
...
@@ -49,6 +49,7 @@ class ViewUserTestCase(unittest.TestCase):
with
patch
.
object
(
InstanceActivityDetail
,
'get_object'
)
as
go
:
act
=
MagicMock
(
spec
=
InstanceActivity
)
act
.
_meta
.
object_name
=
"InstanceActivity"
act
.
user
.
pk
=
1
go
.
return_value
=
act
view
=
InstanceActivityDetail
.
as_view
()
self
.
assertEquals
(
view
(
request
,
pk
=
1234
)
.
render
()
.
status_code
,
200
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment