
CiscoCertified Network Associate Automation (CCNA Automation)
Domain 4Objective 5
5. Construct a Python Unit Test 200-901 Practice Questions (Page 1)
Part of the 4.0 Application Deployment and Security domain, which accounts for 15% of the 200-901 exam. Cisco does not publish an official question count, but from its 120-minute exam (~50–80 total, ~8–12 in this domain), expect 1–1 from this objective — we provide 35 practice questions to prepare you well beyond it. (estimate)
35questions here
7free pages
7concepts
15%of the exam
Questions 1–5
- 1
What is the purpose of a test method inside a unittest.TestCase class?
Select an answer first - 2
A test class needs to set up a mock for a database connection before each test and verify that the mock was used correctly after each test. Which combination of methods should be used?
Select an answer first - 3
A developer is creating a new test file for a module named 'device_utils.py'. The test file should be automatically discovered by unittest when running 'python -m unittest discover' from the project root. Which file name should the developer use?
Select an answer first - 4
A network engineer is writing unit tests for a function that returns the status of an interface as a string. The function should return 'up' when the interface is administratively and operationally up. The engineer writes a test method inside a TestCase class and wants to verify that the function returns the exact string 'up' for a given input. Which assertion should the engineer use?
Select an answer first - 5
A developer is writing tests for a class that opens a network connection in its constructor and closes it in a close() method. Each test must start with a fresh connection and end by closing it, even if the test fails. Which approach correctly implements this behavior?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by Cisco. “200-901” is a trademark of its owner, used for identification only.