Beispiel #1
0
 def test_repeat_email_does_not_generate_connection_event(self):
     res = self.client.post('/email', data={'emails[]': ['*****@*****.**']})
     self.assertEquals(res.status, '204 NO CONTENT')
     self.assertEqual(ConnectionEvent.query_in_deployment().count(), 1)
     res = self.client.post('/email', data={'emails[]': ['*****@*****.**']})
     self.assertEquals(res.status, '204 NO CONTENT')
     self.assertEqual(ConnectionEvent.query_in_deployment().count(), 1)
Beispiel #2
0
 def test_repeat_email_does_not_generate_connection_event(self):
     res = self.client.post("/email", data={"emails[]": ["*****@*****.**"]})
     self.assertEquals(res.status, "204 NO CONTENT")
     self.assertEqual(ConnectionEvent.query_in_deployment().count(), 1)
     res = self.client.post("/email", data={"emails[]": ["*****@*****.**"]})
     self.assertEquals(res.status, "204 NO CONTENT")
     self.assertEqual(ConnectionEvent.query_in_deployment().count(), 1)
Beispiel #3
0
 def test_repeat_email_does_not_generate_connection_event(self):
     res = self.client.post('/email', data={'emails[]': ['*****@*****.**']})
     self.assertEquals(res.status, '204 NO CONTENT')
     self.assertEqual(ConnectionEvent.query_in_deployment().count(), 1)
     res = self.client.post('/email', data={'emails[]': ['*****@*****.**']})
     self.assertEquals(res.status, '204 NO CONTENT')
     self.assertEqual(ConnectionEvent.query_in_deployment().count(), 1)
Beispiel #4
0
    def test_email_connection_is_activity(self):
        UserFactory.create(email=u"*****@*****.**", connections=[])
        self.login()
        res = self.client.post("/email", data={"emails[]": ["*****@*****.**"]})
        self.assertEquals(res.status, "204 NO CONTENT")
        self.assertEqual(ConnectionEvent.query_in_deployment().count(), 1)

        res = self.client.get("/activity")
        self.assert200(res)
        assert "1 new connection made in NOI" in res.data
        assert "1 connection" in res.data
Beispiel #5
0
    def test_email_connection_is_activity(self):
        UserFactory.create(email=u'*****@*****.**', connections=[])
        self.login()
        res = self.client.post('/email', data={'emails[]': ['*****@*****.**']})
        self.assertEquals(res.status, '204 NO CONTENT')
        self.assertEqual(ConnectionEvent.query_in_deployment().count(), 1)

        res = self.client.get('/activity')
        self.assert200(res)
        assert '1 new connection made in NOI' in res.data
        assert '1 connection' in res.data
Beispiel #6
0
    def test_email_connection_is_activity(self):
        UserFactory.create(email=u'*****@*****.**', connections=[])
        self.login()
        res = self.client.post('/email', data={
            'emails[]': ['*****@*****.**']
        })
        self.assertEquals(res.status, '204 NO CONTENT')
        self.assertEqual(ConnectionEvent.query_in_deployment().count(), 1)

        res = self.client.get('/activity')
        self.assert200(res)
        assert '1 new connection made in NOI' in res.data
        assert '1 connection' in res.data