Self-testing protocols enable certification of quantum devices without demanding full knowledge about their inner workings. A typical approach in designing such protocols is based on observing nonlocal correlations which exhibit maximum violation in a Bell test. We show that in Bell experiment known as Hardy's test of nonlocality not only the maximally nonlocal correlation self-tests a quantum state, rather a non-maximal nonlocal behavior can serve the same purpose. We, in fact, completely characterize all such behaviors leading to self-test of every pure two qubit entangled state except the maximally entangled ones. Apart from originating a novel self-testing protocol, our method provides a powerful tool towards characterizing the complex boundary of the set of quantum correlations.