Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
9b76b320
authored
Jul 30, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-nose' into 'master'
Feature Nose
parents
2c621f0f
0e8df261
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
12 deletions
+17
-12
circle/circle/settings/test.py
+4
-0
circle/common/models.py
+10
-10
circle/dashboard/fixtures/test-vm-fixture.json
+1
-1
requirements/base.txt
+0
-1
requirements/test.txt
+2
-0
No files found.
circle/circle/settings/test.py
View file @
9b76b320
...
...
@@ -35,7 +35,11 @@ SOUTH_TESTS_MIGRATE = False
INSTALLED_APPS
+=
(
'acl.tests'
,
'django_nose'
,
)
TEST_RUNNER
=
'django_nose.NoseTestSuiteRunner'
NOSE_ARGS
=
[
'--with-doctest'
]
PASSWORD_HASHERS
=
[
'django.contrib.auth.hashers.MD5PasswordHasher'
]
CACHES
=
{
'default'
:
{
...
...
circle/common/models.py
View file @
9b76b320
...
...
@@ -78,11 +78,11 @@ activity_code_separator = '.'
def
has_prefix
(
activity_code
,
*
prefixes
):
"""Determine whether the activity code has the specified prefix.
E.g.: has_prefix('foo.bar.buz', 'foo.bar') == True
has_prefix('foo.bar.buz', 'foo', 'bar') == True
has_prefix('foo.bar.buz', 'foo.bar', 'buz') == True
has_prefix('foo.bar.buz', 'foo', 'bar', 'buz') == True
has_prefix('foo.bar.buz', 'foo', 'buz') == False
>>> assert has_prefix('foo.bar.buz', 'foo.bar')
>>> assert has_prefix('foo.bar.buz', 'foo', 'bar')
>>> assert has_prefix('foo.bar.buz', 'foo.bar', 'buz')
>>> assert has_prefix('foo.bar.buz', 'foo', 'bar', 'buz')
>>> assert not has_prefix('foo.bar.buz', 'foo', 'buz')
"""
equal
=
lambda
a
,
b
:
a
==
b
act_code_parts
=
split_activity_code
(
activity_code
)
...
...
@@ -93,11 +93,11 @@ def has_prefix(activity_code, *prefixes):
def
has_suffix
(
activity_code
,
*
suffixes
):
"""Determine whether the activity code has the specified suffix.
E.g.: has_suffix('foo.bar.buz', 'bar.buz') == True
has_suffix('foo.bar.buz', 'bar', 'buz') == True
has_suffix('foo.bar.buz', 'foo.bar', 'buz') == True
has_suffix('foo.bar.buz', 'foo', 'bar', 'buz') == True
has_suffix('foo.bar.buz', 'foo', 'buz') == False
>>> assert has_suffix('foo.bar.buz', 'bar.buz')
>>> assert has_suffix('foo.bar.buz', 'bar', 'buz')
>>> assert has_suffix('foo.bar.buz', 'foo.bar', 'buz')
>>> assert has_suffix('foo.bar.buz', 'foo', 'bar', 'buz')
>>> assert not has_suffix('foo.bar.buz', 'foo', 'buz')
"""
equal
=
lambda
a
,
b
:
a
==
b
act_code_parts
=
split_activity_code
(
activity_code
)
...
...
circle/dashboard/fixtures/test-vm-fixture.json
View file @
9b76b320
...
...
@@ -1322,7 +1322,7 @@
"user_permissions"
:
[
115
],
"password"
:
"
pbkdf2_sha256$10000$KIoeMs78MiOj$PnVXn3YJMehbOciBO32CMzqL0ZnQrzrdb7+b5dE13os="
,
"password"
:
"
md5$qLN4mQMOrsUJ$f07129fd1a289a0afb4e09f7a6816a4f"
,
"email"
:
"test@example.org"
,
"date_joined"
:
"2013-09-04T15:29:49.914Z"
}
...
...
requirements/base.txt
View file @
9b76b320
...
...
@@ -21,7 +21,6 @@ kombu==3.0.15
logutils==0.3.3
MarkupSafe==0.21
netaddr==0.7.11
nose==1.3.1
pip-tools==0.3.4
psycopg2==2.5.2
Pygments==1.6
...
...
requirements/test.txt
View file @
9b76b320
...
...
@@ -3,3 +3,5 @@
coverage==3.7.1
factory-boy==2.3.1
mock==1.0.1
django-nose==1.2
nose==1.3.3
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