Example #1
0
    def test_get_dna(self):

        expected_result = Dna()
        expected_result.name = "neuron_test"
        expected_result.module_type = "neuron"
        expected_result.tags = ['test']
        expected_result.author = 'Kalliope project team'
        expected_result.kalliope_supported_version = [0.4]

        dna_to_test = DnaLoader(self.dna_test_file).get_dna()

        self.assertTrue(dna_to_test.__eq__(expected_result))
Example #2
0
    def test_get_dna(self):

        expected_result = Dna()
        expected_result.name = "neuron_test"
        expected_result.module_type = "neuron"
        expected_result.tags = ['test']
        expected_result.author = 'Kalliope project team'
        expected_result.kalliope_supported_version = [0.4]

        dna_to_test = DnaLoader(self.dna_test_file).get_dna()

        self.assertTrue(dna_to_test.__eq__(expected_result))
Example #3
0
    def _load_dna(self):
        """
        retur a DNA object from a loaded yaml file
        :return:
        """
        new_dna = None
        if self._check_dna_file(self.yaml_config):
            new_dna = Dna()
            new_dna.name = self.yaml_config["name"]
            new_dna.module_type = self.yaml_config["type"]
            new_dna.author = self.yaml_config["author"]
            new_dna.kalliope_supported_version = self.yaml_config["kalliope_supported_version"]
            new_dna.tags = self.yaml_config["tags"]

        return new_dna
Example #4
0
    def _load_dna(self):
        """
        retur a DNA object from a loaded yaml file
        :return:
        """
        new_dna = None
        if self._check_dna_file(self.yaml_config):
            new_dna = Dna()
            new_dna.name = self.yaml_config["name"]
            new_dna.module_type = self.yaml_config["type"]
            new_dna.author = self.yaml_config["author"]
            new_dna.kalliope_supported_version = self.yaml_config["kalliope_supported_version"]
            new_dna.tags = self.yaml_config["tags"]

        return new_dna