def test_login(self, resolwe_mock, resauth_mock, resolwe_api_mock): resolwe_mock.url = 'http://some/url' Resolwe._login(resolwe_mock, 'a', 'b') self.assertEqual(resauth_mock.call_count, 1) self.assertEqual(resolwe_api_mock.call_count, 1)
def test_login(self, resolwe_mock, resauth_mock, resolwe_api_mock): resolwe_mock.url = "http://some/url" resauth_mock.cookies = {} Resolwe._login(resolwe_mock, "a", "b") self.assertEqual(resauth_mock.call_count, 1) self.assertEqual(resolwe_api_mock.call_count, 1)