def test_create(self, *args):
        set_module_args(dict(
            image='/path/to/BIGIP-13.0.0.0.0.1645.iso',
            provider=dict(
                server='localhost',
                password='******',
                user='******'
            )
        ))

        current = ApiParameters(params=load_fixture('load_sys_software_image_1.json'))
        module = AnsibleModule(
            argument_spec=self.spec.argument_spec,
            supports_check_mode=self.spec.supports_check_mode
        )

        # Override methods in the specific type of manager
        mm = ModuleManager(module=module)
        mm.exists = Mock(side_effect=[False, True])
        mm.read_current_from_device = Mock(return_value=current)
        mm.create_on_device = Mock(return_value=True)

        results = mm.exec_module()

        assert results['changed'] is True
        assert results['file_size'] == 1948
    def test_api_parameters(self):
        args = dict(file_size='1000 MB',
                    build='0.0.3',
                    checksum='8cdbd094195fab4b2b47ff4285577b70',
                    image_type='release',
                    version='13.1.0.8')

        p = ApiParameters(params=args)
        assert p.file_size == 1000
        assert p.build == '0.0.3'
        assert p.checksum == '8cdbd094195fab4b2b47ff4285577b70'
        assert p.image_type == 'release'
        assert p.version == '13.1.0.8'