def test_myFunction(self):
mock_my = mock.MagicMock()
mock_property = mock.PropertyMock(return_value=123)
type(mock_my).number = mock_property
myFunction(mock_my)
mock_property.assert_called_with()
Как сделать ns сервер на php для создания хостинга?
#!/bin/bash
AAA="First_word@First_line\nSecond_word@Second_line\nThird_word@Third_line"
echo -e "${AAA}" | while read line; do
if [ "$1" == "${line%@*}" ]; then
echo "Second part of the line: ${line#*@}"
fi
done