1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
# Copyright 2014 Canonical
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.
8
"""Tests for Push Notifications client"""
10
from __future__ import absolute_import
12
from testtools.matchers import Equals
13
from autopilot.matchers import Eventually
14
from autopilot.introspection import dbus
16
from autopilot.testcase import AutopilotTestCase
18
from push_notifications.tests import PushNotificationTestBase
19
from push_notifications.tests import PushNotificationMessage
22
class TestPushClient(PushNotificationTestBase):
23
""" Tests a Push notification can be sent and received """
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())