Changeset View
Changeset View
Standalone View
Standalone View
contrib/buildbot/test/test_endpoint_getCurrentUser.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# | # | ||||
# Copyright (c) 2017-2020 The Bitcoin ABC developers | # Copyright (c) 2017-2020 The Bitcoin ABC developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
from test.abcbot_fixture import ABCBotFixture, TEST_USER | from test.abcbot_fixture import ABCBotFixture, TEST_USER | ||||
import unittest | import unittest | ||||
class EndpointGetCurrentUserTestCase(ABCBotFixture): | class EndpointGetCurrentUserTestCase(ABCBotFixture): | ||||
def test_currentUser(self): | def test_currentUser(self): | ||||
rv = self.app.get('/getCurrentUser', headers=self.headers) | rv = self.app.get('/getCurrentUser', headers=self.headers) | ||||
assert rv.data == TEST_USER.encode() | self.assertEqual(rv.data, TEST_USER.encode()) | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
unittest.main() | unittest.main() |