It depends what sort of task you're setting the students. As a first example, suppose you're asking students to write a function student_func that takes a file object as a parameter and prints some data derived from that file. Then you can just upload the test files you want via the Support files section of the author editing form. They will then appear in the runtime directory, ready to be used in any tests. For example, if you set two support files test1.txt and test2.txt then for your two test cases you could have something like:
infile = open('test1.txt')
student_func(infile)
and
infile = open('test2.txt')
student_func(infile)
If instead you want the students to write a program that reads from standard input, you simply put the data (think of it as a file if you like) in the test case Standard input field.
If you want students to write a program that takes a filename as a command line argument you have to jump through a few more hoops. See the forum discussion here.
-- Richard