Re: Unit testing - self.assertEqual(login, True)

2014-07-03 Thread Amim Knabben
duplicated question

https://groups.google.com/forum/#!topic/django-users/I4wmYKNMNn8


On Thu, Jul 3, 2014 at 9:09 AM, Pepsodent Cola <pepsodentc...@gmail.com>
wrote:

> I want to run a unit test for a user logging in but I get error.  What am
> I doing wrong?
>
>
> from django.test import TestCase
> from userprofile.models import UserProfile
> from django.contrib.auth.models import User
>
> class UserProfileTest(TestCase):
> # User factory method
> def create_user(self, username='joe', password='joe'):
> return User.objects.create(username=username, password=password)
>
> # Create User
> def test_creation_USER(self):
> u = self.create_user()
> self.assertTrue(isinstance(u, User))
> login = self.client.login(username='joe', password='joe')
> *self.assertEqual(login, True)*
>
> ==
> FAIL: test_creation_USER (userprofile.tests.UserProfileTest)
> --
> Traceback (most recent call last):
>   File "/home/Django/project/userprofile/tests.py", line 44, in
> test_creation_USER
> self.assertEqual(login, True)
> *AssertionError: False != True*
>
> --
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5d49c776-fe1f-4702-abc1-d2c99468d82a%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/5d49c776-fe1f-4702-abc1-d2c99468d82a%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 

*AMIM KNABBEN*
+55 48 9680 9126 (m)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAODc%2BXaWUytkQGo1PCrRkE4zLzc-TM0P4cdC%3Dxf8bK8%3DCMNgPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deployment in Django

2014-03-22 Thread Amim Knabben
Probably the ones you read there...

If you aren't new on Linux, install the env on Virtualenv (go for
virtualenvwrapper, it will give you some hackable shortcuts), I like
PostgreSQL most, for static/media stuff normally I use Nginx, and for WSGI
Gunicorn, the guys from New Relic have an awesome monitoring tool for free
(without history).

The answer for your first question can be: try Gondor.io or Heroku. But if
you have spare time grab some beers and go with Vagrant, Chef and a bunch
of Fabric lines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAODc%2BXYh%3D_4Q1UntN9hdRJhB4jfwtUL-EuQ3f_xoYyY5bjb6VQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.