~jonas-drange/ubuntu-push/lp1577723-skiptest

« back to all changes in this revision

Viewing changes to tests/autopilot/push_notifications/tests/test_push_client.py

  • Committer: Richard Huddie
  • Date: 2014-04-10 08:42:47 UTC
  • mto: (213.2.1 autopilot-test)
  • mto: This revision was merged to the branch mainline in revision 237.
  • Revision ID: richard.huddie@canonical.com-20140410084247-iarp0r2lt19xdmb8
basic autopilot framework for push

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
 
2
# Copyright 2014 Canonical
 
3
#
 
4
# This program is free software: you can redistribute it and/or modify it
 
5
# under the terms of the GNU General Public License version 3, as published
 
6
# by the Free Software Foundation.
 
7
 
 
8
"""Tests for Push Notifications client"""
 
9
 
 
10
from __future__ import absolute_import
 
11
 
 
12
from testtools.matchers import Equals
 
13
from autopilot.matchers import Eventually
 
14
from autopilot.introspection import dbus
 
15
 
 
16
from autopilot.testcase import AutopilotTestCase
 
17
 
 
18
from push_notifications.tests import PushNotificationTestBase
 
19
from push_notifications.tests import PushNotificationMessage
 
20
 
 
21
 
 
22
class TestPushClient(PushNotificationTestBase):
 
23
    """ Tests a Push notification can be sent and received """
 
24
 
 
25
    def test_get_config(self):
 
26
        msg = PushNotificationMessage(expire_after="2015-12-19T16:39:57-08:00")      
 
27
        server_add = self.get_push_server_listener_address()
 
28
        self.send_push_broadcast_notification(server_add, msg.json())