Beispiel #1
0
    def it_marks_files_as_modified(instance):
        instance.__mapper__.create()
        instance.__mapper__.modified = False

        utilities.save(instance)

        expect(instance.__mapper__.modified) == True
Beispiel #2
0
    def it_marks_files_as_modified(instance):
        instance.__mapper__.create()
        instance.__mapper__.modified = False

        utilities.save(instance)

        expect(instance.__mapper__.modified) == True
Beispiel #3
0
 def it_requires_a_mapped_instance():
     with expect.raises(TypeError):
         utilities.save(Mock)
Beispiel #4
0
    def it_expects_the_file_to_not_be_deleted(instance):
        instance.__mapper__.delete()

        with expect.raises(exceptions.DeletedFileError):
            utilities.save(instance)
Beispiel #5
0
    def it_creates_files(instance):
        utilities.save(instance)

        expect(instance.__mapper__.exists) == True
 def save(self):
     return utilities.save(self)
Beispiel #7
0
 def it_requires_a_mapped_instance():
     with expect.raises(TypeError):
         utilities.save(Mock)
Beispiel #8
0
    def it_expects_the_file_to_not_be_deleted(instance):
        instance.__mapper__.delete()

        with expect.raises(exceptions.DeletedFileError):
            utilities.save(instance)
Beispiel #9
0
    def it_creates_files(instance):
        utilities.save(instance)

        expect(instance.__mapper__.exists) == True