This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HandList(generics.ListCreateAPIView): | |
serializer_class = HandSerializer | |
def get_queryset(self): | |
return Hand.objects.all().filter(user__username=self.request.user) | |
def perform_create(self, serializer): | |
deck = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(goards) ktruong:converge_api ktruong$ python manage.py test goals.tests.test_views.TestHands.test_post_hand_with_deck | |
Creating test database for alias ‘default’… | |
System check identified no issues (0 silenced). | |
E | |
====================================================================== | |
ERROR: test_post_hand_with_deck (goals.tests.test_views.TestHands) | |
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — | |
Traceback (most recent call last): | |
File “/Users/ktruong/git_projects/converge-api/converge_api/goals/tests/test_views.py”, line 261, in test_post_hand_with_deck | |
self.assertTrue(Hand.objects.get(name=’hand1').deck.name == ‘deck1’) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Creating test database for alias ‘default’… | |
System check identified no issues (0 silenced). | |
hit perform_create | |
hit the try guys | |
deck does not exist | |
fail | |
E | |
====================================================================== | |
ERROR: test_post_hand_with_deck (goals.tests.test_views.TestHands) | |
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(goards) ktruong:converge_api ktruong$ python manage.py test goals.tests.test_views.TestHands.test_post_hand_with_deck | |
Creating test database for alias ‘default’… | |
System check identified no issues (0 silenced). | |
Python 3.6.1 (default, Apr 4 2017, 09:40:21) | |
Type “copyright”, “credits” or “license” for more information. | |
IPython 5.3.0 — An enhanced Interactive Python. | |
? -> Introduction and overview of IPython’s features. | |
%quickref -> Quick reference. | |
help -> Python’s own help system. | |
object? -> Details about ‘object’, use ‘object??’ for extra details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createGoal } from './actions' | |
import { selectAuthenticating } from './selectors'; | |
import App from '../App'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import AppRoutes from '../../routes/AppRoutes'; | |
export class AppContainer extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { data: true }; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import AppRoutes from 'routes/AppRoutes'; | |
export class AppContainer extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { data: true }; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Box from './styles/Box | |
export class App extends React.Component { | |
render() { | |
return ( | |
<Box /> | |
); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styled from 'styled-components'; | |
export const Box = styled.div` | |
display: inline-block; | |
background: pink; | |
width: 200px; | |
height: 200px; | |
transition: transform 300ms ease-in-out; | |
&:hover { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Box from './styles/Box | |
import Trigger from './styles/Trigger; | |
export class App extends React.Component { | |
render() { | |
return ( | |
<Trigger> | |
<Box /> | |
</Trigger> |