def testBug639(self):
        # Grab an image for testing.
        filename = os.path.join(os.path.dirname(__file__), "test.jpg")
        img = open(filename, "rb").read()

        # Fake a POST QueryDict and FILES MultiValueDict.
        data = {'title': 'Testing'}
        files = {"image": SimpleUploadedFile('test.jpg', img, 'image/jpeg')}

        form = PhotoForm(data=data, files=files)
        p = form.save()

        # Check the savecount stored on the object (see the model).
        self.assertEqual(p._savecount, 1)
This method is called by the ion endpoint to execute any process operation preconditions functions before
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/regressiontests/bug639/tests.py/Bug639Test.testBug639--crossover with--dataset/ETHPy150Open ooici/pyon/pyon/core/governance/governance_controller.py/GovernanceController.check_process_operation_preconditions