Once trinity decided to test the chastity of Anasuya. They came to Anasuyaa's house as Brahmins and request for food with the condition that she has to serve it nude. Anasuyaa with much hesitation agreed to that. In turn she used her pativrita shakti to convert the Brahmins into child and offered them food without any dress. Trinity could revert back to their original form only after she did herself on the request of gods. Trinity blessed them with three sons being sons: Dattatreya, Chandraatri and Durvasa.
Atri made a great tapascharya on the riksha kulaparvat (kula mountain) because of which the whole world started burning. Brahma-Vishnu-Mahesha were impressed with him and asked him what he wants. For which Atri asked them to be his children (or have children like them). So Atri and Anusuya had 3 sons namely, Soma or Chandra (the Moon) from Brahma, Dattatreya from Vishnu and sage Durvasa from Shiva.
In Brahma Purana, Atri asked for the 3 sons and one daughter. So he had Chandra, Dattatreya, Durvas as sons and Shubhatreyi as daughter from Anusuya.
A Brahmin named Kaushik was staying in a town called Pratishthaan. He used to visit a prostitute in spite of being a Brahmin and having a devoted wife. Later he suffered from Leprosy and was thrown out by the prostitute. Then he came back to his wife who accepted him still. However, he still did not care for the wife, and longed for his erstwhile companion. One day he asked his wife to take him to her. In that town, by mistake the sage Mandavya had been impaled in lieu of a criminal and he was lying on the spike in the forest. While walking through the deep forest in the night, Kaushik happened to trip on the sage who cursed him to death before the sunrise. To stop the curse, Kaushik's wife with her powers stopped the Sunrise which created havoc. Then gods went to Brahma who in turn went to Anusuya and asked her to convince Kaushik's wife to allow the sunrise. She convinced Kaushik's wife and brought back Kaushik to life after the sunrise. Gods were very happy with Anusuya and she had the trio born to her.
Rahu had masked the Sun and whole Earth was in the dark. Then Atri got the Sun out of Rahu's hands and lighted the Earth. The gods were happy and then Shiva and Vishnu were born as Durvas and Dattatreya to Atri-Anusuya.
Sage Narada praised Anusuya very much making the wives of Brahma-Vishnu-Shiva jealous of Anusuya. They requested their husbands to go and break her "pativrata" vrata (being loyal to husband all the time). They went to Anusuya as guests when Atri was not there at home and asked her to serve them food (lunch) without wearing clothes. She agreed and remembering her husband put the water on their converting them to 3 babies. Here the 3 goddesses were waiting for their husbands to come back and eventually arrived at the scene to find that their husbands have been converted to babies. They repented and by the request of Anusuya the three Gods decided to be born as her 3 sons.