Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
piphone
campaign
Commits
1d2b6677
Commit
1d2b6677
authored
Aug 06, 2016
by
okhin
Browse files
WIP #4 test on campaigncontact is fixed
parent
0acb00ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
picampaign/campaign/models.py
View file @
1d2b6677
...
...
@@ -46,7 +46,7 @@ class CampaignContact(models.Model):
contact
=
models
.
ForeignKey
(
Contact
)
weight
=
models
.
IntegerField
(
default
=
0
)
def
__
unicode
__
(
self
):
def
__
str
__
(
self
):
args
=
{
'contact'
:
self
.
contact
,
'title'
:
self
.
campaign
.
title
}
return
_
(
'Contact %(contact)s on %(title)s'
)
%
args
...
...
picampaign/campaign/tests.py
View file @
1d2b6677
...
...
@@ -92,8 +92,8 @@ class CampaignContactMethodTests(TestCase):
contact
=
contact
)
self
.
assertEqual
(
str
(
type
(
campaigncontact
.
__unicode__
())
),
"
<type 'unicode'>
"
str
(
campaigncontact
),
"
Contact Contact object on Campaign Title
"
)
def
test_all_groups_is_empty
(
self
):
...
...
setup.py
View file @
1d2b6677
...
...
@@ -12,9 +12,11 @@ requires = [
'pillow'
,
]
test_requires
=
requires
+
[
'pytest'
]
setup
(
name
=
'picampaign'
,
namespace_packages
=
[
'picampaign'
],
version
=
'0.0.
1
'
,
version
=
'0.0.
2
'
,
description
=
'PiPhone Campaign Manager.'
,
long_description
=
README
,
classifiers
=
[
"Programming Language :: Python"
],
...
...
@@ -26,5 +28,5 @@ setup(name='picampaign',
include_package_data
=
True
,
zip_safe
=
False
,
install_requires
=
requires
,
tests_require
=
requires
,
tests_require
=
test_
requires
,
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment