| Total Complexity | 2 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | """kytos.cli.commands.users.api.UsersAPI tests.""" |
||
| 2 | 1 | import unittest |
|
| 3 | 1 | from unittest.mock import patch |
|
| 4 | |||
| 5 | 1 | from kytos.cli.commands.users.api import UsersAPI |
|
| 6 | |||
| 7 | |||
| 8 | 1 | class TestUsersAPI(unittest.TestCase): |
|
| 9 | """Test the class UsersAPI.""" |
||
| 10 | |||
| 11 | 1 | def setUp(self): |
|
| 12 | """Execute steps before each tests.""" |
||
| 13 | 1 | self.users_api = UsersAPI() |
|
| 14 | |||
| 15 | 1 | @patch('kytos.utils.users.UsersManager.register') |
|
| 16 | 1 | def test_register(self, mock_register): |
|
| 17 | """Test register method.""" |
||
| 18 | 1 | self.users_api.register(None) |
|
| 19 | |||
| 20 | mock_register.assert_called() |
||
| 21 |