aboutsummaryrefslogtreecommitdiff
path: root/tests/fixtures.py
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-12-12 21:14:28 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-12-17 09:42:56 +0100
commitb35e9773198ef2d8b37c4ca223f08147db47de0b (patch)
treeba4b1b171b3c1ab9414a96ad264c47b0f9d1246b /tests/fixtures.py
parentUpdated link to Heroku deploy button on the About page. (diff)
downloadnewspipe-b35e9773198ef2d8b37c4ca223f08147db47de0b.tar.gz
newspipe-b35e9773198ef2d8b37c4ca223f08147db47de0b.tar.bz2
newspipe-b35e9773198ef2d8b37c4ca223f08147db47de0b.zip
moving the root of source code from / to /src/
Diffstat (limited to 'tests/fixtures.py')
-rw-r--r--tests/fixtures.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/fixtures.py b/tests/fixtures.py
deleted file mode 100644
index 99f46c37..00000000
--- a/tests/fixtures.py
+++ /dev/null
@@ -1,31 +0,0 @@
-from web.models import db_create, db_empty, User, Article, Feed
-
-
-def populate_db(db):
- role_admin, role_user = db_create(db)
- user1, user2 = [User(nickname=name, email="%s@test.te" % name,
- pwdhash=name, roles=[role_user], activation_key="")
- for name in ["user1", "user2"]]
- db.session.add(user1)
- db.session.add(user2)
- db.session.commit()
-
- for user in (user1, user2):
- for feed_name in ['feed1', 'feed2', 'feed3']:
- feed = Feed(link=feed_name, user_id=user.id,
- title="%r %r" % (user.nickname, feed_name))
- db.session.add(feed)
- db.session.commit()
- for article in ['article1', 'article2', 'article3']:
- entry = "%s %s %s" % (user.nickname, feed.title, article)
- article = Article(entry_id=entry, link=article,
- feed_id=feed.id, user_id=user.id,
- title=entry, content=article)
- db.session.add(article)
- db.session.commit()
-
- db.session.commit()
-
-
-def reset_db(db):
- db_empty(db)
bgstack15