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