Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
circle/dashboard/templates/base.html
+1
-1
circle/dashboard/templates/dashboard/_display-name.html
+6
-4
circle/dashboard/tests/test_mockedviews.py
+1
-0
No files found.
circle/dashboard/templates/base.html
View file @
9298448a
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
</ul>
</ul>
</li>
</li>
</ul>
</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 "
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>
<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 %}
{% if user.is_superuser %}
...
...
circle/dashboard/templates/dashboard/_display-name.html
View file @
9298448a
{% load i18n %}
{% load i18n %}
{% if user.get_full_name %}
{% if user and user.pk %}
{% if user.get_full_name %}
{{ user.get_full_name }}
{{ user.get_full_name }}
{% else %}
{% else %}
{{ user.username }}
{{ user.username }}
{% endif %}
{% endif %}
{% if show_org %}
{% if show_org %}
{% if user.profile and user.profile.org_id %}
{% if user.profile and user.profile.org_id %}
({{ user.profile.org_id }})
({{ user.profile.org_id }})
{% else %}
{% else %}
({% trans "username" %}: {{ user.username }})
({% trans "username" %}: {{ user.username }})
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
circle/dashboard/tests/test_mockedviews.py
View file @
9298448a
...
@@ -49,6 +49,7 @@ class ViewUserTestCase(unittest.TestCase):
...
@@ -49,6 +49,7 @@ class ViewUserTestCase(unittest.TestCase):
with
patch
.
object
(
InstanceActivityDetail
,
'get_object'
)
as
go
:
with
patch
.
object
(
InstanceActivityDetail
,
'get_object'
)
as
go
:
act
=
MagicMock
(
spec
=
InstanceActivity
)
act
=
MagicMock
(
spec
=
InstanceActivity
)
act
.
_meta
.
object_name
=
"InstanceActivity"
act
.
_meta
.
object_name
=
"InstanceActivity"
act
.
user
.
pk
=
1
go
.
return_value
=
act
go
.
return_value
=
act
view
=
InstanceActivityDetail
.
as_view
()
view
=
InstanceActivityDetail
.
as_view
()
self
.
assertEquals
(
view
(
request
,
pk
=
1234
)
.
render
()
.
status_code
,
200
)
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