Skip to content

Commit

Permalink
Test default view with no listed applications
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyX committed Jan 6, 2015
1 parent c6d70df commit 8d38326
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,22 @@ def test_default_not_all(self):
" - 1 processes requiring reboot\n"
))

def test_default_note_only(self):
view = DefaultView(self.out)
view.assign("args", ArgsMock())
view.assign("applications", ApplicationsCollection([
Application({"type": "session", "name": "foo", "helper": "h1"}),
Application({"type": "session", "name": "bar", "helper": "h2"}),
Application({"type": "static", "name": "baz", "helper": "h3"}),
]))
view.render()
self.assertEquals(self.out.getvalue(), (
"You should restart:\n"
"There are:\n"
" - 2 processes requiring restart of your session (i.e. Logging out & Logging in again)\n"
" - 1 processes requiring reboot\n"
))


class ArgsMock(object):
all = quiet = None
Expand Down

0 comments on commit 8d38326

Please sign in to comment.