Beispiel #1
0
 def testEventDefaults(self):
     expectedSource = { "ref": platform.node(),"type": "host"}
     e = Event.getDefaultEvent()
     
     self.assertIsNone(e.organizationID)
     self.assertIsNotNone(e.title)
     self.assertEqual(e.source,expectedSource)
Beispiel #2
0
    def testEventDefaults(self):
        expectedSource = {"ref": platform.node(), "type": "host"}
        e = Event.getDefaultEvent()

        self.assertIsNone(e.organizationID)
        self.assertIsNotNone(e.title)
        self.assertEqual(e.source, expectedSource)
    def testCreateEvent(self):
        # Create our Boundary Event Connection
        connection = EventConnection(self.apiKey, self.organizationID)
        event = Event.getDefaultEvent()

        #Send an event to the Boundary Server using the Boundary REST API
        eventID = connection.createEvent(event)
        self.assertIsNotNone(eventID, 'Check for returned event ID')
 def testCreateEvent(self):
     # Create our Boundary Event Connection
     connection = EventConnection(self.apiKey,
                                  self.organizationID)
     event = Event.getDefaultEvent()
       
       
     #Send an event to the Boundary Server using the Boundary REST API
     eventID = connection.createEvent(event)
     self.assertIsNotNone(eventID,'Check for returned event ID')
def main():
    k = 'ARI0PzUzWYUo7GG1OxiHmABTpr9'
    o = '3ehRi7uZeeaTN12dErF5XOnRXjC'
    connection = EventConnection(apiKey=k,organizationID=o)
    event = Event.getDefaultEvent()
    
    event.message = 'Hello World'
    event.title = 'Boundary Object Oriented Event API'
    
    eventId = connection.createEvent(event)
    
    print('event id: ' + str(eventId))
    
    newEvent = connection.getEvent(eventId)
    
    print('event: ' + newEvent)
Beispiel #6
0
def main():
    k = 'ARI0PzUzWYUo7GG1OxiHmABTpr9'
    o = '3ehRi7uZeeaTN12dErF5XOnRXjC'
    connection = EventConnection(apiKey=k, organizationID=o)
    event = Event.getDefaultEvent()

    event.message = 'Hello World'
    event.title = 'Boundary Object Oriented Event API'

    eventId = connection.createEvent(event)

    print('event id: ' + str(eventId))

    newEvent = connection.getEvent(eventId)

    print('event: ' + newEvent)
Beispiel #7
0
 def setUp(self):
     self.event = Event.getDefaultEvent()
     pass
Beispiel #8
0
 def setUp(self):
     self.event = Event.getDefaultEvent()
     pass