How do I export Test and Quizzes from an old site to a new site?

The easiest thing to do is to simply Export the pending assessment from the old course and then Import it into the new one. Access the Test & Quizzes section of the course from which you want the test or quiz. Locate the test or quiz in the pending section and use the drop down to select Export. When you do the Export, it will ask you if you want to use "QTI 1.2" or "Content Packaging"; in almost all cases, use the "Content Packaging" option as it tends to be the more reliable / versatile of the two. After that, the Import process is straightforward from the default page of the Tests & Quizzes tool in the course where you want the copy.