def test_bouncer_client_lookup_test_helpers(self):
     bcc = BouncerClient('https://bouncer.ooni.io')
     bcc.queryBackend = MagicMock()
     bcc.queryBackend.return_value = defer.succeed({'spam': 'ham'})
     yield bcc.lookupTestHelpers(["foo"])
     bcc.queryBackend.assert_called_with("POST",
                                         "/bouncer/test-helpers",
                                         query={'test-helpers': ["foo"]})
Esempio n. 2
0
 def test_bouncer_client_lookup_test_helpers(self):
     bcc = BouncerClient('https://bouncer.ooni.io')
     bcc.queryBackend = MagicMock()
     bcc.queryBackend.return_value = defer.succeed({'spam': 'ham'})
     yield bcc.lookupTestHelpers(["foo"])
     bcc.queryBackend.assert_called_with("POST",
                                         "/bouncer/test-helpers",
                                         query={'test-helpers': ["foo"]})
 def test_bouncer_client_lookup_collector(self):
     bcc = BouncerClient('https://bouncer.ooni.io')
     bcc.queryBackend = MagicMock()
     bcc.queryBackend.return_value = defer.succeed({})
     yield bcc.lookupTestCollector(["foo"])
     bcc.queryBackend.assert_called_with("POST",
                                         "/bouncer/net-tests",
                                         query={'net-tests': ["foo"]})
Esempio n. 4
0
 def test_bouncer_client_lookup_collector(self):
     bcc = BouncerClient('https://bouncer.ooni.io')
     bcc.queryBackend = MagicMock()
     bcc.queryBackend.return_value = defer.succeed({})
     yield bcc.lookupTestCollector(["foo"])
     bcc.queryBackend.assert_called_with("POST",
                                         "/bouncer/net-tests",
                                         query={'net-tests': ["foo"]})