def testRequiredFields(self):
        required = MicrobTranscriptomicsRawSeqSet.required_fields()

        self.assertEqual(type(required), tuple,
                         "required_fields() returns a tuple.")

        self.assertTrue(len(required) > 0,
                        "required_fields() did not return empty value.")
    def testRequiredFields(self):
        """ Test the required_fields() static method. """
        required = MicrobTranscriptomicsRawSeqSet.required_fields()

        self.assertEqual(type(required), tuple,
                         "required_fields() returns a tuple.")

        self.assertTrue(len(required) > 0,
                        "required_fields() did not return empty value.")
def set_logging():
    """ Setup logging. """
    root = logging.getLogger()
    root.setLevel(logging.DEBUG)
    ch = logging.StreamHandler(sys.stdout)
    ch.setLevel(logging.DEBUG)
    formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
    ch.setFormatter(formatter)
    root.addHandler(ch)

set_logging()

session = iHMPSession(username, password)

print("Required fields: ")
print(MicrobTranscriptomicsRawSeqSet.required_fields())

mtrss = MicrobTranscriptomicsRawSeqSet()

mtrss.checksums = {"md5": "72bdc024d83226ccc90fbd2177e78d56"}
mtrss.study = "prediabetes"

print("Creating a temp file for example/testing purposes.")
temp_file = tempfile.NamedTemporaryFile(delete=False).name
print("Local file: %s" % temp_file)

mtrss.local_file = temp_file
mtrss.size = 13131
mtrss.seq_model = "test sequencer model"
mtrss.exp_length = 2000
username = "******"
password = "******"

root = logging.getLogger()
root.setLevel(logging.DEBUG)
ch = logging.StreamHandler(sys.stdout)
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)
root.addHandler(ch)

session = iHMPSession(username, password)

print("Required fields: ")
print(MicrobTranscriptomicsRawSeqSet.required_fields())

mtrss = MicrobTranscriptomicsRawSeqSet()

mtrss.checksums = { "md5": "72bdc024d83226ccc90fbd2177e78d56" }
mtrss.study = "prediabetes"

print("Creating a temp file for example/testing purposes.")
temp_file = tempfile.NamedTemporaryFile(delete=False).name
print("Local file: %s" % temp_file)

mtrss.local_file = temp_file
mtrss.size = 13131
mtrss.seq_model = "test sequencer model"
mtrss.exp_length = 2000