Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vimagit
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
jreybert
vimagit
Commits
7f33e4ec
Commit
7f33e4ec
authored
9 years ago
by
Jerome Reybert
Browse files
Options
Downloads
Patches
Plain Diff
test/addSelect*: add unstage by vselect test (ref #73)
parent
28075b0d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/addSelect.vader
+11
-0
11 additions, 0 deletions
test/addSelect.vader
test/addSelect/addSelect_books_models_py_5_vselect_diff.expect
+32
-0
32 additions, 0 deletions
...addSelect/addSelect_books_models_py_5_vselect_diff.expect
with
43 additions
and
0 deletions
test/addSelect.vader
+
11
−
0
View file @
7f33e4ec
...
...
@@ -56,4 +56,15 @@ Execute (Stage marks):
let diff=Git_diff('staged', Get_filename())
call Expect_diff(g:test_script_dir . 'addSelect/addSelect_' . Get_safe_filename() . '_4_marks_diff.expect', diff)
Execute (Unstage selection):
call Cd_test_sub()
Magit
call Search_file('staged')
call magit#open_close_folding(1)
%foldopen!
call Search_pattern("^+\t\tif product.cover_url is not '':$")
execute "normal! v4j:call magit#stage_vselect()\<cr>"
call Cd_test()
let diff=Git_diff('staged', Get_filename())
call Expect_diff(g:test_script_dir . 'addSelect/addSelect_' . Get_safe_filename() . '_5_vselect_diff.expect', diff)
Include: cleanup.inc
This diff is collapsed.
Click to expand it.
test/addSelect/addSelect_books_models_py_5_vselect_diff.expect
0 → 100644
+
32
−
0
View file @
7f33e4ec
diff --git books/models.py books/models.py
--- books/models.py
+++ books/models.py
@@ -1,5 +1,9 @@
from django.db import models
+import urllib2 as urllib
+from PIL import Image
+import io
+
import isbn_search
class User(models.Model):
@@ -24,13 +28,16 @@
class BookManager(models.Manager):
)
return book
+def upload_path(book, filename):
+ return 'covers/%s/%s' % (book.isbn, filename)
+
class Book(models.Model):
isbn = models.CharField(max_length=10, unique=True)
- eisbn = models.CharField(max_length=13, blank=True)
+ eisbn = models.CharField(max_length=13, blank=True, null=True)
title = models.CharField(max_length=200)
author = models.CharField(max_length=200)
- edition = models.CharField(max_length=200, blank=True)
cover = models.ImageField(upload_to='covers', blank=True)
+ edition = models.CharField(max_length=200, blank=True, null=True)
def __unicode__(self):
return u'[%s] "%s" by %s' % (self.isbn, self.title, self.author,)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment