trying to test pushbutton

Your forgetting to do what you did earlier. That is initialise BOTH push buttons as inputs and do a digital write to BOTH of them to enable the internal pull up resistors.