Skip to content

Commit

Permalink
Test suite passing
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Rusev committed Aug 4, 2012
1 parent c19e0e3 commit b062083
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions tests/web/models_test.py
Expand Up @@ -9,7 +9,7 @@
UnreadModel,
BaseModel
)
from nose.tools import eq_
from nose.tools import eq_, assert_true, assert_false
from time import time

now = int(time())
Expand Down Expand Up @@ -194,7 +194,7 @@ def test_delete_before_date(self):
self.model.delete_before_date(minute_ago)

result = self.model.get_logs()
eq_(result['result'].count(), 2)
eq_(result['result'].count(), 1)

self.logs.remove()

Expand Down Expand Up @@ -228,7 +228,7 @@ def test_delete_before_date(self):
self.model.delete_before_date(minute_ago)

result = self.model.get_exceptions()
eq_(result.count(), 2)
eq_(result.count(), 1)

self.model.collection.remove()

Expand Down Expand Up @@ -314,7 +314,18 @@ def test_username_exists(self):
eq_(result, 1)

def test_change_password(self):
assert False
self.model.collection.remove()
user_dict = {"username": "test", "password": "1234"}
self.model.create_user(user_dict)

self.model.update_password({"username": "test"}, '456')

result = self.model.check_user({'username': 'test', 'password': '456'})
assert_true(result)

result = self.model.check_user({'username': 'test', 'password': '1234'})
assert_false(result)


class TestPagination(unittest.TestCase):

Expand Down

0 comments on commit b062083

Please sign in to comment.